Problems with lxml (local install)

Hi Obspy team, I want to run Obspy on a machine where I do not have root access and the server is behind a firewall. I am quite limited with the install options and I used easy_install as pip is broken with some SSL error. I can compile all dependencies but when I try to import the obspy package I get the following error: Python 2.7.5 (default, Apr 17 2014, 09:21:05) [GCC 4.1.2 20070115 (SUSE Linux)] on linux2 Type “help”, “copyright”, “credits” or “license” for more information. >>> import lxml >>> import obspy Traceback (most recent call last): File “”, line 1, in File “/u/mgal/local/lib/python2.7/site-packages/obspy-0.9.0-py2.7-linux-x86_64.egg/obspy/init.py”, line 38, in from obspy.station import read_inventory # NOQA File “/u/mgal/local/lib/python2.7/site-packages/obspy-0.9.0-py2.7-linux-x86_64.egg/obspy/station/init.py”, line 8, in from obspy.station.inventory import Inventory, read_inventory File “/u/mgal/local/lib/python2.7/site-packages/obspy-0.9.0-py2.7-linux-x86_64.egg/obspy/station/inventory.py”, line 17, in from obspy.station.stationxml import SOFTWARE_MODULE, SOFTWARE_URI File “/u/mgal/local/lib/python2.7/site-packages/obspy-0.9.0-py2.7-linux-x86_64.egg/obspy/station/stationxml.py”, line 14, in from lxml import etree ImportError: /u/mgal/local/lib/python2.7/site-packages/lxml-3.3.5-py2.7-linux-x86_64.egg/lxml/etree.so: undefined symbol: clock_gettime I tracked the error down to be a problem with the recent gcc compiler. Apparently someone wrote a fix for it (https://pypi.python.org/pypi/z3c.recipe.staticlxml). With my unix knowledge I am not able to perform this fix as the documentation is not sufficient for me. Is there any other way I could solve this issue? I am only using the obspy.core.read function maybe I can install that separately without the need of lxml? Than you very much, best regards, Martin

Hi Martin,
Have you tried using the Anaconda python distribution? It replaces your system python and doesn’t require admin rights. It comes with lxml and I think most other obspy dependencies. Might be easier than patching lxml yourself.

Regards

Leo

Hi Leo,

first of all sorry for the horribly formated message, something went wrong with my webmail. Thanks for the idea with anaconda, sadly I can not extract it on the server (ERROR: could not extract tar starting at line 455), I tried it also with virtualenv but same result, so I probably will have to wait for the server admin to return from his vacation.

Cheers,
Martin

Hi Martin, that is very strange. Have you tried contacting the people at Continuum? They’re very friendly.

Good luck.

Leo

Hi Leo,

yes I have but no solution for it. I pretty much gave up as the server seems to be broken beyond repair… I am encountering errors which are mind boggling :slight_smile: .
Anyway, thanks for the help. I will try to find another solution.

Cheers,
Martin