import pysdd.sdd in Python3.7 vs Python3.8
I'm getting this error when I try to import pysdd.sdd using Python 3.7.
>>> import pysdd
>>> import pysdd.sdd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pysdd.sdd'
>>>
But it works fine with Python3.8. Anyone know why?
That can occur when the SDD package did not properly compile while installing PySDD. Have you tried reinstalling it for python 3.7 (forcing a recompile to prevent reuse of erroneous wheel)?
python3.7 -m pip install -vvv git+https://github.com/wannesm/PySDD.git#egg=PySDD
Also, out of interest, what does python3.7 -m pip --version say?
I first tried the suggested command in a python 3.7 environment. The installation failed with the following log. test.log
I also tried the command in a python3.8 environment, and I change the python3.7 to python3.8 in the command. It can successfully install the pysdd, but import pysdd.sdd causes the same error as arthur reported.
I fixed the problem in my distribution. The problem wasn't 3.7 vs 3.8, it seemed to be a problem with miniconda. In particular it has its own linker ld distributed with miniconda. When I rename it, I believe it now uses my system's ld, which lets pysdd compile successfully (the error messages I was getting was suggesting a bug in an older version of elfutils/binutils). I don't think this is the problem with Jason above tho, since he is not using miniconda, and he was getting different error messages than I was.
@hahaXD Try adding the --no-use-pep517 flag?
@VincentDerk It works. Thank you.
Hi, I am still seeing this issue on OSX, using python3.7. I pip installed as suggested above: python3.7 -m pip install -vvv git+https://github.com/wannesm/PySDD.git#egg=PySDD. Also tried with the --no-use-pep517.
@sbhaktha
- Did you install the python development environment (e.g. libpython3-dev, python-dev, ...), see dependencies in readme?
- What is the output when you install using -vvv?
It's fixed now! I looked at the other issue (https://github.com/wannesm/PySDD/issues/18) and your proposed solution there worked: pip install -vvv --upgrade --force-reinstall --no-binary :all: --no-deps pysdd. Thanks for your response!
I ran into the same issue when moving from system provided (Ubuntu) Python 3.8 to a fresh Python 3.9 from conda. The command @sbhaktha suggested fixed the issue.
I tried reproducing the failing state by uninstalling and reinstalling with just pip -vvv but had no luck. Once it started working it kept working.
Here is the output anyway: https://gist.github.com/VorpalBlade/6a8de21d5714c84214ce9d56061bc4c7
I ran into the same issue on Python 3.10 again. Very strange.