在win10 64位系統安裝 lxml (Python 3.5)


本想直接用pip install lxml 命令安裝完事,但是由於安裝過程中跟VS的一些東西沖突怎么都安裝不上,搜索到以下方法,問題解決。

步驟:

1.下載跟python匹配的.whl 文件(lxml-3.6.0-cp35-cp35m-win_amd64.whl下載地址 也可以下載附件,但未必適合你。

2.安裝 python -m pip install lxml-3.6.0-cp35-cp35m-win_amd64.whl

可能出現的問題

lxml-3.6.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform

 

版本不匹配,一定要對應版本

cp35 means CPython 3.5 you need lxml-3.6.0-cp35-cp35m-win_amd64.whl instead.

源自 stackoverflow  

Python 3.5 - how to install lxml in Windows 7 64 bits

1. go to this repository and download a version which matches your Python installation (the version number, and 32- vs 64-bit. I use Python 3.5.1 64-bit, installed on Windows 10, so on that page, I chose lxml-3.6.0-cp35-cp35m-win_amd64.whl. You say you use the 32-bit version, so use a version that matches that.
My download directory is d:\Downloads. Python must be in your PATH environment variable for the next step to work. Use a command like the following, changing "D:\Downloads" to the pathname to your download directory. Then, at a DOS prompt, type:

2. python -m pip install "D:\Downloads\lxml-3.6.0-cp35-cp35m-win_amd64.whl" lxml-3.6.0-cp35-cp35m-win_amd64.whl

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM