当同时安装Python3.7时,为什么pip --version和pip3 --version默认为Python3.6?

时间:2019-05-09 13:06:43

标签: python python-3.x pip windows-10 environment-variables

我刚刚安装了Python3.7.3。

pip3 --version
pip 19.1.1 from c:\users\luca\appdata\local\programs\python\python36\lib\site-packages\pip (python 3.6)

pip --version
pip 19.1.1 from c:\users\luca\appdata\local\programs\python\python36\lib\site-packages\pip (python 3.6)

我在Windows 10环境变量中同时设置了Python3.6和Python3.7。即使在PATH变量中切换字符串的顺序也不会改变结果。

为什么pippip3默认使用Python3.6而不是3.7?如何更改?

此外,py --version默认为Python3.7.3。

P.S。我知道我可以打电话给pip3.7 --versionpy -3.7 -m pip --version

-----------------编辑--------------------

根据要求,我的用户的%PATH%

C:\Users\luca\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\luca\AppData\Local\Programs\Python\Python37\;C:\Users\luca\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\luca\AppData\Local\Programs\Python\Python36\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\texlive\2018\bin\win32;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;

系统的%PATH%

C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\PDFtk Server\bin\;C:\Program Files\gnuplot\bin;C:\Program Files\Calibre2\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\

0 个答案:

没有答案