Open Vincent-Liagre-QB opened 1 year ago
Hi @Vincent-Liagre-QB thank you for the feedback! Could you try updating to Spyder 5.4.2 and check again? Also, could you share the example library you are installing in editable mode to try to reproduce this in our side?
Any new info to help us better understand what is happening here is greatly appreciated!
Hi @dalthviz ; unfortunately upgrading didn't solve the issue ; will try and provide a reproducible example
@Vincent-Liagre-QB, please run the following command in the console, before running your code:
%autoreload off
That could help to solve your problem.
Yes but then it will fail to reload my libs, right ? especially annoying for my lib in editable mode. Alternatively I found that CTRL-A + F9 is a good alternative to F5
Yes but then it will fail to reload my libs, right ?
Sure, but in that case you don't need to install them in editable mode. %autoreload
simply reloads any library after you import it with from foo import bar
. So, please try uninstall your modules to see if %autoreload
can do its job without problems.
Alternatively I found that CTRL-A + F9 is a good alternative to F5
If you're satisfied with that solution, can we close this issue then? I mean, there's probably an bug between %autoreload
and editable modules, but that's not something we can solve here. It needs to be reported and solved in IPython itself.
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)spyder --reset
Problem Description
Kernel frequently forgets about library installed in editable mode when running all file at once (F5): it will work for a few executions and then I'll get the
No module named <my_module>
errorNote that this was always working in previous Spyder versions I had
What steps reproduce the problem?
pip install -e . <my_module>
What is the expected output? What do you see instead?
Code to run normally
Paste Traceback/Error Below (if applicable)
Versions
Also working with a
virtualenv 20.17.1
Dependencies