How can I control which Python distribution to pip install a package to when I have Python 2, Python 3, and Anaconda on my computer?

前端 未结 4 1336
囚心锁ツ
囚心锁ツ 2021-02-08 05:15

I have the following Python distributions installed on my Windows computer:

  • Python 2.7 (IDLE)
  • Python 3.4 (IDLE)
  • Anaconda (Python 3.4)
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-08 05:42

    For Anaconda go to C:\Users\USERNAME\Anaconda3\Scripts

    Change these files pip-script.py and pip.exe to pip3-script.py and pip3.exe.

    Then add these variables to your system variables.

    Voila..!! Your Job is done. Now to install use pip2 for 2.7 and pip3 for anaconda version.

提交回复
热议问题