user10953332
user10953332

Reputation:

Python:Change pip path

I install py3.6 in dir A but later I install py3.7 in dir B. But I prefer to use py3.7 so I replace the whole dir A with dir B(A is filled with py3.7 and B does not exist anymore).
Now, my pip is using path:B but it does not exist anymore so I need to change it.
HELP!

Edit:

I use

python -m pip uninstall pip

and install it again with easy_install BUT now it said something cannot import main

Upvotes: 1

Views: 8376

Answers (2)

sanster_23
sanster_23

Reputation: 860

Try setting the environment variable:

PIP_TARGET=/path/to/pip/dir

https://pip.pypa.io/en/stable/user_guide/#environment-variables

Upvotes: 0

Victor Vasiliev
Victor Vasiliev

Reputation: 129

Answer For Windows:

enter image description here

enter image description here

enter image description here

Then replace the old path with the new one at the new one: enter image description here

Upvotes: 2

Related Questions