python3.x - centos python 安裝lxml 報錯 阿里云ECS
問題描述
阿里云主機,原本centos內(nèi)置python 2.7 ,安裝了python 3.6然后因為要使用lxml 解析文檔,結(jié)果使用
pip3 install lxml
Collecting lxml HTTP error 404 while getting http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl#md5=0cf2148ff4e6e65bf9f0bb0c97733f2f (from http://mirrors.aliyun.com/pypi/simple/lxml/) Could not install requirement lxml from http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl#md5=0cf2148ff4e6e65bf9f0bb0c97733f2f because of error 404 Client Error: Not Found for url: http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whlCould not install requirement lxml from http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl#md5=0cf2148ff4e6e65bf9f0bb0c97733f2f because of HTTP error 404 Client Error: Not Found for url: http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl for URL http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl#md5=0cf2148ff4e6e65bf9f0bb0c97733f2f (from http://mirrors.aliyun.com/pypi/simple/lxml/)
請教各位如何解決?按照網(wǎng)上說的額
pip3 install wheel
然而還是沒用請教倒是是怎么解決
當然如果直接用pip 那么是python 2.7的根據(jù)這個帖子 centos python安裝lxml報錯
yum groupinstall development toolsyum install python-devel
發(fā)現(xiàn)安裝的都是python 2.7的結(jié)果還是報錯
問題解答
回答1:看到報錯:
because of error 404 Client Error: Not Found for url: http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl
可能是yum源配置有問題, 可以先嘗試換一個yum源, 然后再試下安裝參考下這個: CentOS 7 安裝EPEL源然后再參考下面的, 安裝lxmlcentos7安裝python,pip,redis,lxml
回答2:使用pip3 install lxml -v 打印更多信息,我估計系統(tǒng)沒裝libXXXdev所致
相關(guān)文章:
1. 淺談vue生命周期共有幾個階段?分別是什么?2. index.php錯誤,求指點3. 視頻 - html5 video的autoplay 在智能手機上不運作?4. javascript - 百度坐標,返回目標附近有哪些坐標5. css3 - 使用less編譯css后,后期的項目中l(wèi)ess是直接放在項目文件中,后期如何維護呢6. css3 - 在css里面,樣式不生效問題7. node.js - 在阿里云搭建vue環(huán)境后npm run dev 沒有看到vue歡迎頁面而是 UnhandledPromiseRejection8. javascript - Jquary的contains如何做到精準匹配9. html5 - 前端面試碰到了一個緩存數(shù)據(jù)的問題,來論壇上請教一下10. javascript - ui-router AngularJS url顯示正常 頁面沒有變化?
