简体   繁体   English

在Windows中的python3解释器之间切换

[英]Switching between python3 interpreters in windows

I have been using python 34 and use pip from command line in windows to install my packages. 我一直在使用python 34,并在Windows的命令行中使用pip来安装我的软件包。 Now I have installed python 36 without uninstalling python 34. However I cannot install packages into python 36 using pip as it is configured to Python 34. Any elegant solutions for this problem. 现在,我已经安装了python 36,而没有卸载python34。但是,由于将pip配置为Python 34,因此无法使用pip将软件包安装到python 36中。针对此问题的任何优雅解决方案。

I'm adding my comment as an answer so I can add my reference. 我正在添加我的评论作为答案,所以我可以添加我的参考。

use this command to specify which python version you want to install packages too. 使用此命令来指定您也要安装软件包的python版本。 Just replace 'SomePackage' with the package name you want to install. 只需将“ SomePackage”替换为您要安装的软件包名称即可。

 py -3.6 -m pip install SomePackage

I found this on this Here 我在这里找到这个

EDIT This is for Windows. 编辑这是用于Windows。 For Mac or Linux users switch py -3.6 to python3.6 对于Mac或Linux用户,将py -3.6切换为python3.6

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM