Closed arshad171 closed 1 year ago
There seems to be a mix of python version in play (I see both 3.11 and 3.9 in different parts of your build), so if I had to venture a guess, that's probably why it's not working.
@mcmtroffaes Thanks for the quick reply!
There seems to be a mix of python version in play (I see both 3.11 and 3.9 in different parts of your build), so if I had to venture a guess, that's probably why it's not working.
You were right. When I created a python3.11 virtual env and installed pycddlib
, it worked and I was able to use the library.
However, I would like to have python3.9 for my work (due to compatibility issues).
So tried I having an isolated Anaconda environment, but I see the same error as before.
I also tried setting CPPFLAGS
to point to python3.9
(unlike I had it pointing to python3.11
before). The installation went through, however, I still see the same error when trying to import the lib
(rl-mo-env) [arshad@cloud-01 ~]$ python --version
Python 3.9.18
(rl-mo-env) [arshad@cloud-01 ~]$ which python
/work/arshad/anaconda3/envs/rl-mo-env/bin/python
(rl-mo-env) [arshad@cloud-01 ~]$ pip list | grep dev
devtools 0.12.2
(rl-mo-env) [arshad@cloud-01 ~]$ echo $CPPFLAGS
-I/usr/include/python3.9/
(rl-mo-env) [arshad@cloud-01 ~]$ pip install pycddlib
Collecting pycddlib
Using cached pycddlib-2.1.7-cp39-cp39-linux_x86_64.whl
Installing collected packages: pycddlib
Successfully installed pycddlib-2.1.7
(rl-mo-env) [arshad@cloud-01 ~]$ python -c "import cdd"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /work/arshad/anaconda3/envs/rl-mo-env/lib/python3.9/site-packages/cdd.cpython-39-x86_64-linux-gnu.so: undefined symbol: PyDescr_IsData
I'm glad you managed to make it work with Python 3.11.
As a next step for the Python 3.9 build, I suggest using "python -m pip install pycddlib" instead of "pip install pycddlib", that way you know 100% for sure you're using the pip that fits the correct python installation. Though the venv should get this right... but I can't see where else it might be going wrong.
Either way PyDescr_IsData is part of the Python API (for both python 3.9 and 3.11) so it looks like a shared library loading issue not specific to pycddlib itself (as far as I can tell).
Also note it's using the cached version which might still be corrupted. Try clearing the cache first before the build.
Thank you!
That worked. Setting the CPPFLAGS
to python 3.9 and using --no-cache
did a clean build
Hi,
I have a Fedora production server where I am trying to install
cdd
. I came across the following documentation and installed the required dependenciesAnd then I could install
pycddlib
by first setting the include path and then pip installHowever, I am unable to use or even import the library in my python code I see the following error
undefined symbol: PyDescr_IsData
I would really appreciate your help!
Thanks, Arshad