Ubuntu16.04 pip安装出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-7

今天装scrapy遇到了这个问题,在网上搜索了一下解决方案,不过方案时间较远,更改了一下,完美解决。

第一步:sudo python3 -m pip install --upgrade --force pip

第二步:sudo pip install setuptools==40.0.0

这时执行sudo pip install scrapy 会出现

pyasn1-modules 0.2.2 has requirement pyasn1<0.5.0,>=0.4.1, but you'll have pyasn1 0.1.9 which is incompatible.

不怕,按照上面的安装步骤继续

sudo pip install pyasn1-modules==0.2.2

再次执行 sudo pip install scrapy

成功。

你可能感兴趣的:(Ubuntu16.04 pip安装出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-7)