我正在尝试安装python的模块aiohttp,这样我就可以用uvloop设置一个下载文件的系统。然而,当我进入我解压aiohttp的文件夹并执行以下命令时,我遇到了一些困难:
sudo python3 setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from setuptools import setup, Extension
ImportError: No module named 'setuptools'我环顾四周,发现有些人遇到了这个问题,但通过获取python-setuptools或python3-setuptools包可以解决这个问题。所以我试着这样做,但这是我得到的输出:
$ sudo apt-get install python3-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-setuptools is already the newest version.
python3-setuptools set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
$ sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-setuptools is already the newest version.
python-setuptools set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.这让我相信python-setuptools已经安装好了!我不知道下一步该怎么走。为了清楚起见,我试过了
sudo python setup.py install但是我收到了一个错误,因为安装aiohttp需要Python 3.4.1+:
sudo python setup.py install
Traceback (most recent call last):
File "setup.py", line 61, in <module>
raise RuntimeError("aiohttp requires Python 3.4.1+")
RuntimeError: aiohttp requires Python 3.4.1+我在HP Elitebook 8440p上运行Linux Mint 17.2 Qiana。对我应该做什么有什么建议吗?提前感谢!
发布于 2017-02-12 13:39:31
首先安装python3
brew install python3 && cp /usr/local/bin/python3 /usr/local/bin/python
然后使用pip3安装aiohttp
pip3 install aiohttp
发布于 2016-11-16 03:48:32
sudo dnf install python-devel-2.7.12-6.fc24.x86_64解决了我的问题
发布于 2018-11-06 14:27:28
对我来说,在Mac笔记本电脑上安装uvloop是可行的:
pip install uvloophttps://stackoverflow.com/questions/37056398
复制相似问题