Open picca opened 5 years ago
If I try to execute from pyFAI.opencl import ocl
, I get this error message
picca@mordor:~/Debian/pyfai/pyfai$ PYTHONPATH=/home/picca/Debian/pyfai/pyfai/.pybuild/cpython2_2.7_pyfai/build python2.7
Python 2.7.15+ (default, Aug 31 2018, 11:56:52)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyFAI.opencl import ocl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyFAI/__init__.py", line 50, in <module>
raise RuntimeError("Do NOT use %s from its sources: build it and use the built version" % project)
RuntimeError: Do NOT use pyFAI from its sources: build it and use the built version
Here the sys.path
>>> import sys
>>> sys.path
['', '/home/picca/Debian/pyfai/pyfai/.pybuild/cpython2_2.7_pyfai/build', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-i386-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk3']
we can see that '' is the first path
If I change the current dir, it works.
picca@mordor:~/Debian/pyfai$ PYTHONPATH=/home/picca/Debian/pyfai/pyfai/.pybuild/cpython2_2.7_pyfai/build python2.7
Python 2.7.15+ (default, Aug 31 2018, 11:56:52)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyFAI.opencl import ocl
and the sys.path is identical to the precedent.
I instrumented the code of /home/picca/Debian/pyfai/pyfai/.pybuild/cpython2_2.7_pyfai/build/pyFAI/azimuthalIntegrator.py
in order to print the sys.path
and I get this
['/home/picca/Debian/pyfai/pyfai/.pybuild/cpython2_2.7_pyfai/build', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-i386-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk3']
now we do not have ''
Ok, this is a bad interaction with the --no-opencl option. If I remove --no-opencl from the command line it works.
hello, while preparing the package, I get this error