I am running python within a virtual environment wrapper and I try to import UUID. Here is the trace of what I receive :
python -v
>>> import uuid
# /home/tanzaho/.virtualenvs/django_wordiz/lib/python2.7/site-packages/uuid.pyc matches /home/tanzaho/.virtualenvs/django_wordiz/lib/python2.7/site-packages/uuid.py
import uuid # precompiled from /home/tanzaho/.virtualenvs/django_wordiz/lib/python2.7/site-packages/uuid.pyc
import ctypes # directory /usr/lib/python2.7/ctypes
# /usr/lib/python2.7/ctypes/__init__.pyc matches /usr/lib/python2.7/ctypes/__init__.py
import ctypes # precompiled from /usr/lib/python2.7/ctypes/__init__.pyc
dlopen("/home/tanzaho/.virtualenvs/django_wordiz/lib/python2.7/lib-dynload/_ctypes.dll", 2);
import _ctypes # dynamically loaded from /home/tanzaho/.virtualenvs/django_wordiz/lib/python2.7/lib-dynload/_ctypes.dll
# /usr/lib/python2.7/struct.pyc matches /usr/lib/python2.7/struct.py
import struct # precompiled from /usr/lib/python2.7/struct.pyc
dlopen("/home/tanzaho/.virtualenvs/django_wordiz/lib/python2.7/lib-dynload/_struct.dll", 2);
import _struct # dynamically loaded from /home/tanzaho/.virtualenvs/django_wordiz/lib/python2.7/lib-dynload/_struct.dll
# /usr/lib/python2.7/ctypes/_endian.pyc matches /usr/lib/python2.7/ctypes/_endian.py
import ctypes._endian # precompiled from /usr/lib/python2.7/ctypes/_endian.pyc
# /usr/lib/python2.7/ctypes/util.pyc matches /usr/lib/python2.7/ctypes/util.py
import ctypes.util # precompiled from /usr/lib/python2.7/ctypes/util.pyc
After that, python just stops without any other warning. I tried to reinstall the library from Cygwin, but that did not help.
Is there a way I can fix this?
I should specify that I am using python 2.7 under Windows7 64bits.
Edit The following link helped me to find a possible eerror soure : Bug python 18784 . But I looked at the code specified in the patch and it seems that python does not even reach that point.
Solution As I cannot 'enter the solution' because my reputation is too low, I post it as an edit here. I found the solution via the following patch : http://bugs.python.org/file20685/issue11063.patch
I had the same symptoms on 64-bit Cygwin. Installing the "libuuid-devel" and "binutils" Cygwin packages resolved the import crash for me.
There's more discussion about solutions at: https://github.com/kennethreitz/requests/issues/1547.
the solution is here https://github.com/kennethreitz/requests/issues/1547#issuecomment-29301616
apt-cyg install libuuid-devel
after this the installation works
easy_install requests
printf "help('modules')" | python | grep requests
array hotshot requests xmlrpclib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With