cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
304 stars 155 forks source link

No module named 'imp' #1263

Closed Andrea3v closed 3 months ago

Andrea3v commented 3 months ago

Hi cortex-lab

I'm trying to install Phy on windows10 using a virtual environment (anaconda). however I get the following error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Andre\AppData\Roaming\Python\Python312\Scripts\phy.exe\__main__.py", line 4, in <module>
  File "C:\Users\Andre\AppData\Roaming\Python\Python312\site-packages\phy\__init__.py", line 21, in <module>
    from .utils.config import load_master_config
  File "C:\Users\Andre\AppData\Roaming\Python\Python312\site-packages\phy\utils\__init__.py", line 8, in <module>
    from .plugin import IPlugin, attach_plugins
  File "C:\Users\Andre\AppData\Roaming\Python\Python312\site-packages\phy\utils\plugin.py", line 14, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

it seems the module "imp" has been deprecated in python 3.12, so I tried to create a new environment with pyhton=3.11.7 instead and install the dependencies using:

conda install cython dask h5py joblib matplotlib numpy pillow pyopengl pyqt pyqtwebengine pytest qtconsole requests responses scikit-learn scipy traitlets --freeze-installed

but it is still forcing the upgrade to python3.12.

any help would be appreciated!

~Andre

Andrea3v commented 3 months ago

I just forced the installation of Python3.11.7 in the environment following the installation of the dependencies and phy is now running again...