weird issue trying to install scipy in python virtualenv

478 views Asked by At

I'm having trouble installing scipy in an existing virtualenv with the following packages already installed

Jinja2==2.7.3
Logbook==0.9.1
Mako==1.0.1
Markdown==2.6.2
MarkupSafe==0.23
Nikola==7.4.1
Pillow==2.8.2
PyRSS2Gen==1.1
Pygments==2.0.2
Unidecode==0.04.17
Yapsy==1.11.023
backports.ssl-match-hostname==3.4.0.2
blinker==1.3
certifi==2015.04.28
configparser==3.3.0.post2
docutils==0.12
doit==0.28.0
functools32==3.2.3.post1
ghp-import==0.4.1
ipython==3.1.0
jsonschema==2.5.0 
lxml==3.4.4
matplotlib==1.4.3
mistune==0.5.1
mock==1.0.1
natsort==4.0.1
nose==1.3.7
numpy==1.9.2
ptyprocess==0.5
pyinotify==0.9.6
pyparsing==2.0.3
python-dateutil==2.4.2
pytz==2015.4
pyzmq==14.6.0
requests==2.7.0
six==1.9.0
terminado==0.5
tornado==4.2
webassets==0.10.1
wsgiref==0.1.2

I'm on Ubuntu 14.04, and the virtualenv uses python 2.7.9 which I set up using pyenv. The first time I tried installing Scipy, I got a unicode error similar to the one reported here

Trouble installing scipy in virtualenv on a amazon ec2 linux micro instance

I tried a second time and it worked :/.

I also tried installing PySide, but it keeps failing with this error

[ 83%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir   
/shibokenbuffer.cpp.o

Linking CXX shared library libshiboken-python2.7.so

/usr/bin/ld: /home/demba/.pyenv/versions/2.7.9   
/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against  
`_Py_NotImplementedStruct' can not be used when making a shared object; 
recompile with -fPIC

/home/demba/.pyenv/versions/2.7.9/lib/libpython2.7.a: error adding    
symbols: Bad value

collect2: error: ld returned 1 exit status

make[2]: *** [libshiboken/libshiboken-python2.7.so.1.2.2] Error 1

make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2

make: *** [all] Error 2

error: Error compiling shiboken

----------------------------------------
Cleaning up...
Command /home/demba/Documents/testenv2/bin/python -c "import setuptools, 
tokenize;__file__='/home/demba/Documents/testenv2/build/PySide/setup.py';
exec(compile(getattr(tokenize, 'open', 
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install 
--record /tmp/pip-w_D7L6-record/install-record.txt --single-version-
externally-managed --compile --install-headers /home/demba/Documents
/testenv2/include/site/python2.7 failed with error code 1 in /home/demba
/Documents/testenv2/build/PySide

Traceback (most recent call last):
File "/home/demba/Documents/testenv2/bin/pip", line 11, in <module>
sys.exit(main())
File "/home/demba/Documents/testenv2/lib/python2.7/site-packages
/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/home/demba/Documents/testenv2/lib/python2.7/site-packages
/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 115: 
ordinal not in range(128)

I started a clean virtualenv testenv which uses python 2.7.6 (which comes with my distro). I'm able to cleanly install numpy and scipy and PySide.

Any thoughts on why the packages are having trouble getting installed with python 2.7.9?

Thanks.

0

There are 0 answers