使用pip 在 Python 3 中安装包
第 1 步: 安装 Python 3。是的,默认情况下,应用程序文件 pip3.exe 已位于路径 (E.g.) 中:
C:/Users/name/AppData/Local/Programs/Python/Python36-32/Scripts
第 2 步:转到
>Control Panel (Local Machine) > System > Advanced system settings >
>Click on `Environment Variables` >
Set a New User Variable, for this click `New` >
Write new 'Variable name' as "PYTHON_SCRIPTS" >
Copy that path of `pip3.exe` and paste within variable value > `OK` >
>Below again find out and click on `Path` under 'system variables' >
Edit this path >
Within 'Variable value' append and paste the same path of `pip3.exe` after putting a ';' >
Click `OK`/`Apply` and come out.
第 3 步:现在,通过按键 Windows+R 打开 cmd bash/shell。
> Write 'pip3' and press 'Enter'. If pip3 is recognized you can go ahead.
第四步:在同一个cmd
> Write path of the `pip3.exe` followed by `/pip install 'package name'`
作为例子只写:
C:/Users/name/AppData/Local/Programs/Python/Python36-32/Scripts/pip install matplotlib
现在按Enter。包matplotlib 将开始下载。
进一步,用于升级任何包
再次打开cmd bash/shell,然后
输入pip3.exe 的路径,后跟/pip install --upgrade 'package name'
按Enter。
作为例子只写:
C:/Users/name/AppData/Local/Programs/Python/Python36-32/Scripts/pip install --upgrade matplotlib
将开始升级包
:)