你如何指定使用pip安装模块的python发行版?(How do you specify which python distribution to install a module for with pip? [duplicate])
这个问题在这里已经有了答案:
如何将Python 3.x与Python 2.x一起使用pip 7答案我正尝试在我的Mac上使用pip安装来安装python 3.5的yweather模块,但是因为我同时安装了python 3.5和2.7我不知道如何指定要安装模块的分发版本 - 您将如何执行此操作?
This question already has an answer here:
How to use pip with Python 3.x alongside Python 2.x 10 answersI am trying to install the yweather module for python 3.5 on my mac using pip install, however as i have both python 3.5 and 2.7 i don't know how to specify which distribution to install the module for - how would you do this?
最满意答案
点将在您的系统上安装默认python模块。 如果您想确保pip为特定版本安装,请使用pip2或pip3而不是pip。
如果你还没有,你应该考虑使用虚拟环境 。
pip will install a module for the default python on your system. If you want to be sure that pip installs for a specific version, use pip2 or pip3 instead of pip.
Also if you aren't already, you should consider using virtual environments.
更多推荐
发布评论