在Python中安装软件包 [英] Installing package in Python
本文介绍了在Python中安装软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在笔记本电脑中同时安装了python 2.7和python 3.5.当我安装软件包并使用例如:
I have in my laptop installed both python 2.7 and python 3.5 . When I install a package and use for example:
pip install thunder-python
或
easy_install thunder
在命令提示符下,已为python 3.5安装了软件包.如何安装软件包以便在python 2.7中使用它们?我正在使用Windows 10.
in command prompt the packages are installed for python 3.5. How can I install the packages in order to use them in python 2.7? I am using Windows 10.
推荐答案
如何使用 pyenv ? 如果您使用它,则可以像这样更改和切换版本并安装软件包.
How about using pyenv? If you use it, you can change and switch version and install package like this.
$ pyenv local 2.7.X
$ pip install thunder-python
之后
$ pyenv local 3.5.X
$ pip install thunder-python
这篇关于在Python中安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文