Title No module named pkg_resources
Priority bug Status resolved
Superseder Nosy List kayhayen, russ
Assigned To kayhayen Keywords wrong_execution

Created on 2016-04-18.23:18:47 by russ, last changed by kayhayen.

msg1916 (view) Author: russ Date: 2016-04-20.13:50:06
The pkg_resources thing is fixed now (thanks).  Still have the followup problems I 
indicated (with undefined references).  I will make a separate issue since the 
title one is resolved.
msg1909 (view) Author: kayhayen Date: 2016-04-19.06:43:55

this is fixed on the "factory" branch for both Python2 and Python3 on Linux 
alikes, I need to check Windows still.

Find the git branch with it here:

Thanks for your report. This will help the out of the box experience even more.

msg1908 (view) Author: kayhayen Date: 2016-04-19.05:13:22
Uncommenting the "__import__('pkg_resources').require('Nuitka==0.5.20')" line and 
it works for me already.

msg1907 (view) Author: kayhayen Date: 2016-04-19.05:04:54

Nuitka re-executes itself without the "site" module loaded, preserving the 
PYTHONPATH and reloading it in "bin/nuitka" before doing anything else. This trick 
seems flawed with whatever distutils created there.

It would have to embody the same trick for that script I suppose.

Do "pip install nuitka" as a workaround for now. I will investigate what kind of 
things pip creates there, and how the re-execution could be made smarter.

msg1906 (view) Author: russ Date: 2016-04-18.23:34:50
Since running from a pip installed version of the 0.5.20 git tag may not be a good idea, I 
tried pulling down the tar file and just running from bin/nuitka.  Got an entirely different 
set of errors:

~/Downloads/Nuitka-0.5.20/bin$ ./nuitka ./ --portable In function `PRINT_ITEM_TO(_object*, _object*)':
CompiledCodeHelpers.cpp:(.text+0x2e79): undefined reference to `_PyUnicodeUCS2_IsWhitespace' In function `BUILTIN_GETATTR(_object*, _object*, 
CompiledCodeHelpers.cpp:(.text+0x3ade): undefined reference to 
`_PyUnicodeUCS2_AsDefaultEncodedString' In function `UNSTREAM_UNICODE(unsigned char const*, 
CompiledCodeHelpers.cpp:(.text+0x3531): undefined reference to 
`PyUnicodeUCS2_FromStringAndSize' In function `main':
module.__main__.cpp:(.text.startup+0x1b3): undefined reference to `PyUnicodeUCS2_FromString'
collect2: error: ld returned 1 exit status
scons: *** [test.dist/test.exe] Error 1
~/Downloads/Nuitka-0.5.20/bin$ ./nuitka --version

I should probably make a new issue or rename this one, but will leave it here for now.  Not 
sure if the original pkg_resources issue is with the, or something weird on my 
msg1905 (view) Author: russ Date: 2016-04-18.23:18:47
I thought I'd give Nuitka a try on Debian (wheezy) and ran into immediate problems.  
Can't find pkg_resources, although it is definitely available.  I'm using python 2.7.9 
in a virtualenv, not the distro python.

The sequence below shows the entire chain of events. 

~$ cd code/github/
~/code/github$ git clone
Cloning into 'Nuitka'...
remote: Counting objects: 34821, done.
remote: Total 34821 (delta 0), reused 0 (delta 0), pack-reused 34821
Receiving objects: 100% (34821/34821), 21.01 MiB | 1.42 MiB/s, done.
Resolving deltas: 100% (24745/24745), done.
Checking connectivity... done.
~/code/github$ cd Nuitka/
~/code/github/Nuitka$ git checkout 0.5.20 2>/dev/null
~/code/github/Nuitka$ pip install -e .
Obtaining file:///home/russ/code/github/Nuitka
Installing collected packages: Nuitka
  Running develop for Nuitka
Successfully installed Nuitka-0.5.20
~/code/github/Nuitka$ nuitka --version
~/code/github/Nuitka$ echo print \"foo\" >
~/code/github/Nuitka$ python 
~/code/github/Nuitka$ nuitka --portable 
Traceback (most recent call last):
  File "/home/russ/.virtualenvs/edms/bin/nuitka", line 4, in <module>
ImportError: No module named pkg_resources
~/code/github/Nuitka$ python -c "import pkg_resources"
~/code/github/Nuitka$ python --version
Python 2.7.9
Date User Action Args
2018-03-14 13:33:48kayhayensetstatus: testing -> resolved
2016-04-20 13:50:06russsetmessages: + msg1916
2016-04-19 06:43:55kayhayensetstatus: in-progress -> testing
assignedto: kayhayen
messages: + msg1909
nosy: + kayhayen
2016-04-19 05:13:22kayhayensetmessages: + msg1908
2016-04-19 05:04:54kayhayensetstatus: chatting -> in-progress
messages: + msg1907
keyword: + wrong_execution
2016-04-18 23:34:50russsetstatus: unread -> chatting
messages: + msg1906
2016-04-18 23:18:47russcreate