Another interesting tidbit that appeared in the chat; how can you, given (1) a directory of modules where some modules conflict with other modules on your
PYTHONPATH, where (2) you are interested in one that isn't in conflict?
Here is the contents of existing
And you would like
tractor from here.
As you can see, another copy of PySide resides in there, one that would not work as a replacement for the one you already have - perhaps it is a different version, perhaps compiled in some other way.
In one-off situations, a quick and dirty way around it is this.
Given Python's caching mechanism, this can happen anywhere in your active Python session, and other modules attempting to import it will automatically reference the already imported copy of
tractor, even though it is no longer on your
sys.modules dictionary for where Python is searching before looking in
If the problem is recurring or permanent, a more sustainable option may be to rethink your strategy. Rather than maintain these two directory structures of conflicting packages, you could split them up.
Then you are free to add the versions you are interested in.
$ cd packages
$ export PYTHONPATH=$(pwd)/PySide_1.21:$PYTHONPATH
Due to the more explicit
PYTHONPATH, dedicated tools were built to manage these.
Tools such as..