On 9/30/16 08:33, Steve Barnes wrote:
On 30/09/2016 15:23, Coyot Linden (Glenn Glazer) wrote:
> On 9/30/16 03:03, Steve Barnes wrote:
>> On 30/09/2016 09:45, Hartmut Goebel wrote:
>>> > Hi,
>>> > 
>>> > Am 30.09.2016 um 07:12 schrieb Steve Barnes:
>>> > 
>>>> >> File:        c:\python27\lib\queue.py
>>>> >> […]
>>>> >> File:        c:\python27\lib\site-packages\queue\__init__.py
>>> > 
>>> > Thanks Steve, for tracking this down.
>>> > 
>>> > @Coyote: This sounds like you mixed your Python 2.7 and your Python 3.4
>>> > environment. Since Windows file-system ignores case when searching for
>>> > files, you'll end up with this kind of errors. I strongly suggest to use
>>> > a virtual environment when freezing your software with PyInstaller.
>>> > 
>>> > 
>> I think that one of six, __future__, backports or some other package
>> might be responsible for this.  However, setting up a virtualenv for
>> builds is ALWAYS a good idea so that you know what your dependencies are
>> and so that upgrading a package in your main environment doesn't break
>> something that build before.
> 
> For the record, there is no Python 3 on our systems.  Here's another
> interesting experiment.  If I launch a python shell on Windows and do:
> 
>>>> import Queue
>>>> import queue
> 
> I do not get an error.  But if I do this on Mac, I get:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named queue
> 
> because the UNIX in MacOS recognizes case. 
> 
> Best,
> 
> coyot
> 
> -- 
A further experiment:

virtualenv TestVM
New python executable in F:\toolbuild\TestVM\Scripts\python.exe
Installing setuptools, pip, wheel...done.

F:\toolbuild>testvm\Scripts\activate.bat

(TestVM) F:\toolbuild>python -c"import queue;"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named queue

(TestVM) F:\toolbuild>pip install future
Collecting future
Installing collected packages: future
Successfully installed future-0.15.2

(TestVM) F:\toolbuild>python -c"import queue;"

(TestVM) F:\toolbuild>
<NO ERROR>

So the ministry queue package, (queue), arrives with "future" - I would
guess that it is necessary for some reason - I think that it allows
import queue by shimming the existing Queue module but obviously it
causes pyinstaller issues.

It would be interesting to try the same on the Mac to see if this
introduces the problem but I do not have one to hand.

Tried to repro on Mac, but for some reason virtualenv won't install future even though I can outside of it:

[email protected]:~$ pip install future
Collecting future
  Using cached future-0.15.2.tar.gz
Installing collected packages: future
  Running setup.py install for future ... done
Successfully installed future-0.15.2

[email protected]:~$ virtualenv pytest
New python executable in /Users/gglazer/pytest/bin/python
Installing setuptools, pip, wheel...done.

[email protected]:~$ source pytest/bin/activate
(pytest) [email protected]:~$ python -c"import queue;"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named queue


(pytest) [email protected]:~$ pip install future
Collecting future
  Using cached future-0.15.2.tar.gz
Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
  File "/Users/gglazer/pytest/lib/python2.7/site-packages/pip/req/req_install.py", line 372, in setup_py
    import setuptools  # noqa
  File "/Users/gglazer/pytest/lib/python2.7/site-packages/setuptools/__init__.py", line 10, in <module>
    from setuptools.extern.six.moves import filter, filterfalse, map
  File "/Users/gglazer/pytest/lib/python2.7/site-packages/setuptools/extern/__init__.py", line 1, in <module>
    from pkg_resources.extern import VendorImporter
ImportError: No module named extern


Best,

coyot

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to