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

AttributeError: module 'pyximport.pyximport' has no attribute 'get_distutils_extension' #2198

Closed
qci-amos opened this issue Jul 18, 2023 · 3 comments

Comments

@qci-amos
Copy link

Bug Description

My CI builds are suddenly erroring out:

../../../virtualenv/python3.8.13/lib/python3.8/site-packages/my_code.py:14: in <module>
    import qutip
../../../virtualenv/python3.8.13/lib/python3.8/site-packages/qutip/__init__.py:64: in <module>
    import qutip.cy.pyxbuilder as _pyxbuilder
../../../virtualenv/python3.8.13/lib/python3.8/site-packages/qutip/cy/pyxbuilder.py:17: in <module>
    old_get_distutils_extension = pyximport.pyximport.get_distutils_extension
E   AttributeError: module 'pyximport.pyximport' has no attribute 'get_distutils_extension'

Code to Reproduce the Bug

import qutip

Code Output

No response

Expected Behaviour

no exception

Your Environment

I'm using `qutip-4.7.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl`.

Additional Context

This exact same environment was working in yesterday's CI build. We speculate that Cython's major release yesterday is related.

@Ericgig
Copy link
Member

Ericgig commented Jul 19, 2023

Thank you for reporting.
Yes, Qutip does not work with cython 3.0.0.
I found a bug in cython trying to fix it so the patch could take some time.

@qci-amos
Copy link
Author

Ah, I see now that you do have a pin:

cython>=0.29.20,<3.0.0

but there hasn't been a release since that change.

@qci-amos
Copy link
Author

I think this has been resolved by #2220

@Ericgig Ericgig closed this as completed Aug 23, 2023
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