鍍金池/ 問答/Python  Linux  網(wǎng)絡(luò)安全/ ubuntu14.04 安裝scrapy 失敗

ubuntu14.04 安裝scrapy 失敗

錯誤信息如下:

  Downloading cryptography-2.1.4.tar.gz (441kB): 441kB downloaded
  Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
    error in cryptography setup command: Invalid environment marker: python_version < '3'
    Complete output from command python setup.py egg_info:
    error in cryptography setup command: Invalid environment marker: python_version < '3'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log

我的python版本是python3.4呀
圖片描述

網(wǎng)上搜到的答案都試過了,還是不行,請高人指點

回答
編輯回答
慢半拍

sudo pip3 install scrapy

2018年5月31日 23:20
編輯回答
紓惘

解決了,感謝樓上兩位大俠提供的思路
我把/usr/local/lib/python2.7/dist-packages目錄下的setuptools*文件全部刪除,然后控制臺輸入

wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python

千萬不要直接

pip install setuptools

這樣默認安裝的是最新版本,不支持2.*,然后運行pip安裝啥都不行了

最后 pip install scrapy,成功!

2017年1月15日 10:29
編輯回答
尛憇藌

試試升級
pip install --upgrade setuptools

2017年4月9日 04:17