python3.x - centos python 安裝lxml 錯誤 阿里雲ECS
我想大声告诉你
我想大声告诉你 2017-06-05 11:09:40
0
2
886

阿里雲主機,原本centos內建python 2.7 ,安裝了python 3.6
然後因為要使用lxml 解析文檔,結果使用

pip3 install lxml 
Collecting lxml
  HTTP error 404 while getting http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950
ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl#md5=0cf2148f
f4e6e65bf9f0bb0c97733f2f (from http://mirrors.aliyun.com/pypi/simple/lxml/)
  Could not install requirement lxml from http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657a
dc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl#m
d5=0cf2148ff4e6e65bf9f0bb0c97733f2f because of error 404 Client Error: Not Found for url: http://
mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d09
5d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl
Could not install requirement lxml from http://mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc
8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d095d/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/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7
d095d/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-manylin
ux1_x86_64.whl#md5=0cf2148ff4e6e65bf9f0bb0c97733f2f (from http://mirrors.aliyun.com/pypi/simple/l
xml/)

請教各位如何解決?
依照網路上說的額

pip3 install wheel  

然而還是沒用請教倒是怎麼解決

當然如果直接用pip 那麼是python 2.7的
根據這個帖子 centos python安裝lxml報錯

yum groupinstall development tools
yum install python-devel

發現安裝的都是python 2.7的
結果還是報錯

我想大声告诉你
我想大声告诉你

全部回覆(2)
过去多啦不再A梦

看到報錯:

because of error 404 Client Error: Not Found for url: http://
mirrors.aliyun.com/pypi/packages/0a/75/d54af657adc8625aa950ae7be4e4f33ef2b5014380556790fc6c7b7d09
5d/lxml-3.8.0-cp36-cp36m-manylinux1_x86_64.whl

可能是yum源配置有問題, 可以先嘗試換一個yum源, 然後再試下安裝
參考下這個: CentOS 7 安裝EPEL源
然後再參考下面的, 安裝lxml
centos7安裝python, pip,redis,lxml

我想大声告诉你

使用pip3 install lxml -v 列印更多資訊,我估計系統沒裝libXXXdev所致

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板