pip安裝iPython報錯的解決方案__Python

來源:互聯網
上載者:User

今天配pyCaffe環境時遇到了問題,安裝庫時執行

for req in $(cat requirements.txt); do pip install $req; donesudo pip install -r requirements.txt

命令時,總是報紅錯。最終解決整理一下。

首先,出現種種Permission denied,最終用root賬戶操作解決的。
接下來,其他的都安裝好了,就差ipython安不上,單獨用pip install ipython
安裝,報的錯為:
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-A63c8f/ipython/
經過搜尋得到原因:預設安裝的ipython版本太高,只能手動降版本。

pip install ipython==8888

上述命令輸入了一個不存在的版本,這樣提示中會列出所有現存版本。

經過嘗試,6及以上的版本都花花報錯,最終使用了5的最高版本。

sudo pip install ipython==5.5.0

再次執行sudo pip install -r requirements.txt,出來了一片Requirement already satisfied。搞定。

ps:
1. 僅供參考:我的pip版本手動升版本到了9.0.2,python版本內建2.7;
2. 溫馨提示:盡量全程用root使用者操作,別用sudo,能免去很多麻煩。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.