BluePyOpt
BluePyOpt copied to clipboard
Importing imp fails in an environment with Python 3.12+
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.
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.
Python 3.12 was added in a1f470becfe97ee6d6354862acff97824264caf4, making version 1.14.11 officially supporting Python 3.12. Has the imp issue been addressed? IOW, can this issue be closed?
Answering my own question: Yes! This works now in Python 3.12 without requiring zombie-imp.
Thanks for the update @penguinpee. Yes, this PR (https://github.com/BlueBrain/BluePyOpt/pull/492) added Python 3.12 support. The ticket can be closed.