Python3.5 用 pip 安裝scrapy時出現 “Unable to find vcvarsall.bat ”

來源:互聯網
上載者:User

我在網上搜了好多,說需要安裝 vs2010,但是我安裝了vs2010專業版,依然還是這個問題“Unable to find vcvarsall.bat ”
再然後,我又照網上說的下載安裝MinGW了,並且修改了環境變數等一系列東西,最後錯誤又變成了“TypeError: unorderable types: NoneType() >= str()”
請問這個到底該怎麼解決???

其實不用安裝vs和mingw,解決方案如下

1. 安裝wheel,命令列運行:

pip install wheel

2.在這裡下載對應的.whl檔案,注意別改檔案名稱

http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

Ctrl + F,輸入lxml,找到下面這段

Lxml, a binding for the libxml2 and libxslt libraries.
lxml‑3.4.4‑cp27‑none‑win32.whl
lxml‑3.4.4‑cp27‑none‑win_amd64.whl
lxml‑3.4.4‑cp33‑none‑win32.whl
lxml‑3.4.4‑cp33‑none‑win_amd64.whl
lxml‑3.4.4‑cp34‑none‑win32.whl
lxml‑3.4.4‑cp34‑none‑win_amd64.whl
lxml‑3.4.4‑cp35‑none‑win32.whl
lxml‑3.4.4‑cp35‑none‑win_amd64.whl

cp後面是Python的版本號碼,27表示2.7,根據你的Python版本選擇下載。

3. 進入.whl所在的檔案夾,執行命令即可完成安裝
Default

pip install 帶尾碼的完整檔案名稱
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.