mac pip install lxml faild --已解决
来源:互联网 发布:电脑打开软件特效 编辑:程序博客网 时间:2024/05/21 12:40
Mac终端执行pip install lxml报错:
(env) zhudeMacBook-Air:the19 zhu$ pip install lxmlCollecting lxml Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103e4cda0>: Failed to establish a newconnection: [Errno 65] No route to host',)': /simple/lxml/ Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103e492e8>: Failed to establish a newconnection: [Errno 65] No route to host',)': /simple/lxml/ Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103e49390>: Failed to establish a newconnection: [Errno 65] No route to host',)': /simple/lxml/ Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103e490b8>: Failed to establish a newconnection: [Errno 65] No route to host',)': /simple/lxml/ Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103e49198>: Failed to establish a newconnection: [Errno 65] No route to host',)': /simple/lxml/ Could not find a version that satisfies the requirement lxml (from versions: )No matching distribution found for lxml
解决办法:
使用命令来设置编译的包含头文件
sudo C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MaOSX10.11.sdk/usr/include pip install lxml
结果如下:
(env) zhudeMacBook-Air:the19 zhu$ sudo C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MaOSX10.11.sdk/usr/include pip install lxmlThe directory '/Users/zhu/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may wantsudo's -H flag.The directory '/Users/zhu/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's-H flag.Collecting lxml Downloading lxml-4.0.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (8.7MB) 100% |████████████████████████████████| 8.7MB 94kB/sInstalling collected packages: lxmlSuccessfully installed lxml-4.0.0
阅读全文
0 0
- mac pip install lxml faild --已解决
- pip install lxml因网络问题失败
- Python: Win7下使用 pip install lxml 无法安装lxml
- mac install pip
- mac install pip
- Install pip on MAC
- Mac环境安装 pip lxml requests
- 解决使用pip安装lxml包报错问题
- pip install lxml scrapy pywin32等报错问题解决
- pip install scipy 错误解决
- MAC OSX下用pip无法安装lxml的解决办法
- MAC OSX下用pip无法安装lxml的解决办法
- Mac下pip安装pymssql报错“brew install freetds”解决
- INSTALL PIP FOR MAC OSX TERMINAL
- (Mac OS X)pip install with socks5
- Mac下pip install “Permission Denied”解决办法
- MAC pip install 权限错误解决办法.md
- pip lxml安装
- c#毫秒级计时
- C# 类型转换
- 设计模式C++实现(6)——建造者模式
- Spring Aop +自定义注解实现用户权限控制
- html的script标签
- mac pip install lxml faild --已解决
- SuperMap iDesktop 9D之统计图表
- 为什么程序员都反感笔试?
- python爬虫乱码问题
- 关于malloc问题的改错-笔试常考
- HTML扫雷实战
- 开源协议 BSD Apache GPL LGPL MIT
- 常用Linux命令总结记载
- 开发入门——代码规范