Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cython not found #917

Open
dajuno opened this issue Jan 23, 2016 · 1 comment
Open

Cython not found #917

dajuno opened this issue Jan 23, 2016 · 1 comment

Comments

@dajuno
Copy link

dajuno commented Jan 23, 2016

Hello,
I'm trying to install fenics on a cluster with intel compilers and host-python 2.7.10. Apparently, h5py can't find the hashstack Cython 0.23.3 installed as its dependency. With the $PYTHONPATH set automatically to
'PYTHONPATH': u'/home/dnolte/.hashdist/bld/cython/zb55xazf5kjr/lib/python2.7/site-packages',
The installation fails immediately with

Traceback (most recent call last):
   File "setup.py", line 125, in <module>
     raise ValueError("Cython is required to compile h5py in MPI mode")
 ValueError: Cython is required to compile h5py in MPI mode

because HAVE_CYTHON == False.
With the same PYTHONPATH set, python -> import Cython fails.

Cython build log: https://gist.github.com/dajuno/103b1fe1068296cee092

I noticed that the cython site-packages folder is different from that on my laptop (almost standard fenics.yaml-installation on Arch w/o host packages). On the cluster I got:

site-packages/
    Cython-0.23.3-py2.7-linux-x86_64.egg/
        Cython/
        cython.py
        cython.pyc
        EGG-INFO/  
        pyximport/

while on the full hashstack installation on the laptop I have the structure

site-packages/
    Cython/
    Cython-0.23.3-py2.7.egg-info
    cython.py
    cython.pyc
    pyximport/

In the first case, when $PYTHONPATH is set on the correct cython site-packages directory, the Cython module can't be found within the egg folder.

Any thoughts?

Cheers, David

@johannesring
Copy link
Contributor

I think this has something to do with setuptools and distutils. In hashstack we use distutils to install Cython, but setup.py in Cython will prefer setuptools if it is available. Since you are using host-python on the cluster, setuptools will likely be available and will be used to install Cython.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants