[英]Python 3.6 No module named pip
I have just installed Python 3.6 on Fedora 25 (64 bits) by running dnf install python36
and I can't use any modules Python 3.5 can otherwise use just fine, for example, PyCharm complains about setup tools not being installed, also I can run python3 and issue:我刚刚通过运行dnf install python36
在 Fedora 25(64 位)上安装了 Python 3.6,但我无法使用 Python 3.5 可以使用的任何模块,否则可以正常使用,例如,PyCharm 抱怨未安装安装工具,我也可以运行python3和问题:
import aiohttp
However, if run python36 and then:但是,如果运行 python36 然后:
import aiohttp
I instead get:我反而得到:
Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'aiohttp'回溯(最近一次调用):文件“”,第 1 行,在 ModuleNotFoundError 中:没有名为“aiohttp”的模块
Pip is also not present on python36, as python36 -m pip throws: python36 上也不存在 Pip,因为 python36 -m pip 抛出:
/usr/bin/python36: No module named pip /usr/bin/python36: 没有名为 pip 的模块
I have to note that I've got python 3.4, 3.5 and 3.6 installed at the same time, both 3.4 and 3.5 working just fine我必须注意,我同时安装了 python 3.4、3.5 和 3.6,3.4 和 3.5 都可以正常工作
On Fedora 25 Python 3.6 comes as a minimalistic version without pip
and without additional dnf
installable modules.在Fedora 25 上, Python 3.6 是一个简约的版本,没有pip
,也没有额外的dnf
安装模块。
But you can manually install pip
:但是您可以手动安装pip
:
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py
After that you can use it as python3.6 -m pip
or just pip3.6
.之后,您可以将其用作python3.6 -m pip
或pip3.6
。
In Debian distributions, you can run在 Debian 发行版中,您可以运行
sudo apt-get install python-pip ##for python2
sudo apt-get install python3-pip ##for python3
sudo dnf install python3须藤 dnf 安装 python3
Try this.试试这个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.