python3.x - centos python 安装lxml 报错 阿里云ECS
问题描述
阿里云主机,原本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/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/)
请教各位如何解决?按照网上说的额
pip3 install wheel
然而还是没用请教倒是是怎么解决
当然如果直接用pip 那么是python 2.7的根据这个帖子 centos python安装lxml报错
yum groupinstall development toolsyum install python-devel
发现安装的都是python 2.7的结果还是报错
问题解答
回答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 打印更多信息,我估计系统没装libXXXdev所致
相关文章:
1. docker Toolbox在win10 家庭版中打开报错2. 使用C#如何导入导出Excel文件?3. python - flask jinjia2 中怎么定义嵌套变量4. 就一台服务器,mysql数据库想实现自动备份,如何设计?5. javascript - web拍照换脸技术原理6. javascript - 回调函数和闭包的关系7. javascript - jQuery中live事件在移动微信端下没有效果;代码如下8. html - 怎么实现css画半圆边框9. javascript - 求教各位,本地HTML页面怎么在DIV中嵌套服务器上的页面内容?不用iframe。10. python - uwsgi+django的搭建问题