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

Fix removal of imp in python 3.12 #1229

Closed zm711 closed 1 month ago

zm711 commented 8 months ago

@rossant,

I don't actually have the phy test suite setup so I made this fix based on reading python docs. In Python 3.12 they have completely removed imp and the rec is to switch to importlib. Could you either test to make sure these changes work or walk me through setting up the phy test suite so I can make sure this works.

If you don't want to do this I'll do a PR to change the python version to < 3.11 for the install stuff.

BisonLeo commented 7 months ago

this patch tested working

zm711 commented 7 months ago

Thanks @BisonLeo , this code is called during plug-in usage. Do you actually use plug-ins to test that it works for plug-ins or did you test just to see if it would let you install with python 3.12?

AceTylerCholine commented 1 month ago

I'm confused. For me, the rest of Phy doesn't work with Python 3.12, so I just define python=3.11 when installing it, but this patch prevents plugins from working for me on either 3.11 or 3.12

zm711 commented 1 month ago

Thanks @AceTylerCholine,

someone else said they tested it and it worked. Which is why it was merged. Could you open an issue an post the error so I can work on this some more. Could you also share your plugin so I have something to test against?

AceTylerCholine commented 1 month ago

@zm711 https://github.com/cortex-lab/phy/issues/1281