So I was trying to modify an existing library and instead of doing it the smart way and using pip -e
I instead just installed the libraries, then swapped the modified files for whatever changes I wanted. For example if I had:
Library A/
---doSomethingA.py
---otherFiles.py
I just deleted doSomethingA.py
and replaced it with my version of doSomethingA.py
. Theoretically I figured, because im editing the file locally, it should still work as planned for my library with whatever extra functionality I want.
HOWEVER.... its basically going crazy. While I can see my edited changes in the file, when I run the library its obviously not running that file. I did things like:
commenting out the whole file (still runs somehow)
Actually uninstalling the library and part of another script using
doSomethingA.py
it still runs?? (i.e Something likeimport libraryA
works onJupyerHub
, but not on theputty
terminal... ?)
I've obviously come to the conclusion that its not running the file that it says that it is (and trust me I've checked the path of the file like 10 times).
My question is:
- How is this possible? What are the places that python would store another copy of the file etc?
I've also deleted the __pychache__
, but I can't think of anything else to do. Is my best option to just give up and create a new virtual environment, etc?