从3.4升级后,如何在python3.5中使用pip? [英] How to use pip with python3.5 after upgrade from 3.4?
问题描述
我在Ubuntu上,并且我已经并行安装了python2.7(已预安装),python3.4(今天已使用)和python3.5(我已升级到今天).他们自己都可以正常工作.
I'm on Ubuntu and I have python2.7, (it came pre-installed) python3.4, (used before today) and python3.5, which I upgraded to today, installed in parallel. They all work fine on their own.
但是,我想使用pip
安装一些软件包,但我不知道如何在3.5版安装中执行此操作,因为pip
安装2.7,而pip3
安装python 3.4软件包.
However, I want to use pip
to install some packages, and I can't figure out how to do this for my 3.5 installation because pip
installs for 2.7 and pip3
installs python 3.4 packages.
例如,我在3.4上安装了asyncio,但无法从3.5导入.当我执行pip3 install aysncio
时,它告诉我该要求已经满足.
For instance, I have asyncio installed on 3.4, but I can't import it from 3.5. When I do pip3 install aysncio
, it tells me the requirement is already satisfied.
我是一个新手,但是我在安装目录中进行了一些窥探,但是找不到任何东西,而且我在谷歌上搜索都无济于事.
I'm a bit of a newbie, but I did some snooping around install directories and couldn't find anything and I've googled to no avail.
推荐答案
我想您可以通过Python运行pip
,直到问题解决为止. ( https://docs.python.org/dev/installing/)
I suppose you can run pip
through Python until this is sorted out. (https://docs.python.org/dev/installing/)
快速搜索似乎表明这确实是一个错误.试试这个并报告:
A quick googling seems to indicate that this is indeed a bug. Try this and report back:
python3.4 -m pip --version
python3.5 -m pip --version
如果他们报告的版本不同,那么我想你很好.只需运行python3.5 -m pip install package
而不是pip3 install package
即可安装3.5软件包.
If they report different versions then I guess you're good to go. Just run python3.5 -m pip install package
instead of pip3 install package
to install 3.5 packages.
这篇关于从3.4升级后,如何在python3.5中使用pip?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!