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

import pysdd.sdd in Python3.7 vs Python3.8 #19

Open
art-ai opened this issue Mar 5, 2020 · 10 comments
Open

import pysdd.sdd in Python3.7 vs Python3.8 #19

art-ai opened this issue Mar 5, 2020 · 10 comments

Comments

@art-ai
Copy link
Collaborator

art-ai commented Mar 5, 2020

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?

@VincentDerk
Copy link
Contributor

VincentDerk commented Mar 5, 2020

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?

@hahaXD
Copy link

hahaXD commented Mar 5, 2020

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.

@art-ai
Copy link
Collaborator Author

art-ai commented Mar 5, 2020

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.

@VincentDerk
Copy link
Contributor

VincentDerk commented Mar 6, 2020

@hahaXD Try adding the --no-use-pep517 flag?

@hahaXD
Copy link

hahaXD commented Mar 6, 2020

@VincentDerk It works. Thank you.

@sbhaktha
Copy link

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.

@VincentDerk
Copy link
Contributor

@sbhaktha

  1. Did you install the python development environment (e.g. libpython3-dev, python-dev, ...), see dependencies in readme?
  2. What is the output when you install using -vvv?

@sbhaktha
Copy link

It's fixed now! I looked at the other issue (#18) and your proposed solution there worked: pip install -vvv --upgrade --force-reinstall --no-binary :all: --no-deps pysdd. Thanks for your response!

@VorpalBlade
Copy link

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

@VorpalBlade
Copy link

I ran into the same issue on Python 3.10 again. Very strange.

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

5 participants