你如何指定使用pip安装模块的python发行版?(How do you specify which python distribution to install a module for with

编程入门 行业动态 更新时间:2024-10-23 07:22:00
你如何指定使用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 answers

I 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.

更多推荐

本文发布于:2023-04-27 14:21:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1327163.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   发行版   python   pip   duplicate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!