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

Importing imp fails in an environment with Python 3.12+ #481

Closed
befeleme opened this issue Dec 19, 2023 · 4 comments
Closed

Importing imp fails in an environment with Python 3.12+ #481

befeleme opened this issue Dec 19, 2023 · 4 comments

Comments

@befeleme
Copy link

befeleme commented Dec 19, 2023

In a venv with Python 3.12 and bluepyopt installed from PyPI:

>>> from bluepyopt.ephys import simulators
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/tmp/blue/venv/lib64/python3.12/site-packages/bluepyopt/ephys/__init__.py", line 25, in <module>
    from . import simulators  # NOQA
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/tmp/blue/venv/lib64/python3.12/site-packages/bluepyopt/ephys/simulators.py", line 7, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

Module imp has been removed from Python 3.12.

@anilbey
Copy link
Contributor

anilbey commented Dec 19, 2023

Hi, at the moment bluepyopt is not supporting Python 3.12 primarily because the NEURON simulator has not yet released the necessary wheel files for Python 3.12: https://pypi.org/project/NEURON/#files.

Thanks for creating the issue, we will certainly take this into account as we work towards updating BluePyOpt for Python 3.12 compatibility.

@penguinpee
Copy link
Contributor

Python 3.12 was added in a1f470b, making version 1.14.11 officially supporting Python 3.12. Has the imp issue been addressed? IOW, can this issue be closed?

@penguinpee
Copy link
Contributor

Answering my own question: Yes! This works now in Python 3.12 without requiring zombie-imp.

@anilbey
Copy link
Contributor

anilbey commented Apr 8, 2024

Thanks for the update @penguinpee. Yes, this PR (#492) added Python 3.12 support. The ticket can be closed.

@anilbey anilbey closed this as completed Apr 8, 2024
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

3 participants