Python Forum
Python keeps running the old version of the code - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python keeps running the old version of the code (/thread-36136.html)



Python keeps running the old version of the code - quest - Jan-19-2022

Hello
I have a very weird problem
I am using ubuntu 20.04
I am running my code in terminal like that:

python3 code.py
ALthoguh I change some line in the code, it keeps running the old version of the code

What causes it?
I am quite confused...


RE: Python keeps running the old version of the code - quest - Jan-19-2022

I did not understand what happened exactly but I reactivated anaconda stuff and it is now okay ...


RE: Python keeps running the old version of the code - ThiefOfTime - Jan-20-2022

To be fair, I never run into that problem myself. And I mean you already solved it yourself, but I would like to give you a bit of context. Also I am quite sure you may run into that again.
So I assume that you restartet the python3 call and made sure to save your file before that. I bet you did, just wanting to mention it.
What anaconda likes to do is to cache your modules and reuse them.
What you can do to prevent this is explained here:
https://stackoverflow.com/questions/45664942/anaconda-keeps-caching-modules