CentOS下pip pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found ...

來源:互聯網
上載者:User

報錯資訊:

pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found and is required by the application

根據提示資訊可以知道distribution沒有安裝,所以就安裝一下:

$wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz$tar -xzvf distribute-0.6.10.tar.gz$cd distribute-0.6.10$python setup.py install

然後安裝pip 1.5.4

easy_install pip==1.5.4

現在運行scrapy報錯:

bash: scrapy: command not found

這就是Path裡沒有找到scrapy,現在scrapy在/usr/local/bin/scrapy裡,所以在Path裡做一個軟串連到這兒就可以。

$cd /usr/bin/ | ll | grep scrapy  # 檢查是否存在$ln -s /usr/local/bin/scrapy /usr/bin/scrapy  # 建立一個軟串連$scrapy list  # 測試成功

參考:
https://blog.csdn.net/daiyutage/article/details/69945850
https://blog.csdn.net/EDDYCJY/article/details/77482228?locationNum=6&fps=1

windows下個人總結的安裝scrapy填坑:① 安裝python2.7(2.7.9以後應該都內建pip和setuptool了)② 安裝pywin32(linux應該可以跳過,win下沒有這個運行scrapy會報錯)③ 安裝lxml 去https://pypi.python.org/pypi/lxml下載對應版本(win目前只有3.6.0)④ 安裝pyOpenSSL,去https://launchpad.net/pyopenssl下載對應版本安裝⑤ pip install Scrapy
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.