Hi all,
I tried to install the newest versions of numpy, matplotlib etc. onto our local galaxy server. These need the python 2.7.10 package, which installs just fine. But the numpy, matplotlib dependencies do not install with the following error:
Traceback (most recent call last): File "/usr/local/bin/easy_install", line 7, in <module> from setuptools.command.easy_install import main File "/home/galaxy_production/galaxy-dist/dependency_dir/python/2.7.10/iuc/package_python_2_7_10/73631e818d3d/lib/python2.7/site-packages/setuptools/__init__.py", line 11, in <module> from setuptools.extension import Extension File "/home/galaxy_production/galaxy-dist/dependency_dir/python/2.7.10/iuc/package_python_2_7_10/73631e818d3d/lib/python2.7/site-packages/setuptools/extension.py", line 8, in <module> from .dist import _get_unpatched File "/home/galaxy_production/galaxy-dist/dependency_dir/python/2.7.10/iuc/package_python_2_7_10/73631e818d3d/lib/python2.7/site-packages/setuptools/dist.py", line 18, in <module> from setuptools import windows_support File "/home/galaxy_production/galaxy-dist/dependency_dir/python/2.7.10/iuc/package_python_2_7_10/73631e818d3d/lib/python2.7/site-packages/setuptools/windows_support.py", line 2, in <module> import ctypes File "/home/galaxy_production/galaxy-dist/dependency_dir/python/2.7.10/iuc/package_python_2_7_10/73631e818d3d/lib/python2.7/ctypes/__init__.py", line 10, in <module> from _ctypes import Union, Structure, Array ImportError: /home/galaxy_production/galaxy-dist/dependency_dir/python/2.7.10/iuc/package_python_2_7_10/73631e818d3d/lib/python2.7/lib-dynload/_ctypes.so: undefined symbol: PyUnicodeUCS2_FromUnicode
So it seems that the python distribution that the installation wants to use is ucs4 coded and not ucs2. I already rebuild the systems python using the --enable-unicode=ucs2 argument. The virtual environment was still running Python 2.7.9. I build Python 2.7.10 from source and set up a new virtual environment with this version. Nothing helped.
I also updated some of the eggs today (including numpy) of which at least some are also ucs2 coded (referring from the egg names), which worked perfectly fine.
Before the update all tools worked perfectly.
Does somebody have an idea what could have gone wrong?
Thanks and best regards,
Thomas
Can you rebuild the system wide python with --enable-unicode=ucs2. The TS packages are build with ucs4 and numpy from the TS expects this. The question we need to solve is why does the TS numpy picks up some system-wide libraries :(
I rebuild my system python now with --enable-unicode=ucs2. I checked whether the configuration worked with 'sys.maxunicode'. The output was correct. Trying to install numpy in galaxy gave me the same error as before. For your reference I uploaded the installation.log file in the corresponding dependency_dir path (/home/galaxy_production/galaxy-dist/dependency_dir/numpy/1.9/iuc/package_python_2_7_numpy_1_9/c1e72cd24a9c) as a google document: https://docs.google.com/document/d/15NoUCfYpYvHHpDgNT9v9cRUEqk7UV40iwVjF5w9Uxsk/edit?usp=sharing. I tried the same with the --enable-unicode=ucs4 option, but it did not make a difference. While the system python gave me the correct maxunicode value, the installation of numpy failed with the same error. The installation.log file was exactly identical.
Could it be a bug with easy_install / setuptools, since it seems to be the only path in the logs not referring to a galaxy owned directory?
Great troubleshooting information! This post is linked to the issue I created (here) so the team will see the comments when they review. Thanks, Jen