I am using python. I installed the wrong module, and now I want to remove and reinstall it. Since it is erroneous, I cannot use pip uninstallto remove it. Instead, I have to manually remove packages. I was able to remove packages, but the problem arose from the import path. When I delete the package directory, say /home/mypath/directory/, from my PC. Then the import path disappears when I run the commands:
import sys
print sys.path
The printed results do not have this directory. However, when I recreate this directory and run the commands again:
import sys
print sys.path
this directory will appear again. How can I make the system not visit this directory? I know that there is an environment variable PYTHONPATH, but I only know how to add a path using PYTHONPATH, I donβt know how to remove a path. Thanks to everyone for helping me.
source
share