mac pip install lxml faild --已解决
2017-10-10 09:22
976 查看
Mac终端执行pip install lxml报错:
解决办法:
使用命令来设置编译的包含头文件
结果如下:
(env) zhudeMacBook-Air:the19 zhu$ pip install lxml Collecting 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 lxml The 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/s Installing collected packages: lxml Successfully installed lxml-4.0.0
相关文章推荐
- MAC OSX下用pip无法安装lxml的解决办法
- MAC OSX下用pip无法安装lxml的解决办法
- Mac下pip安装pymssql报错“brew install freetds”解决
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- Mac下pip install “Permission Denied”解决办法
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- MAC pip install 权限错误解决办法.md
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- 解决Python下pip install MySQL-python失败的问题
- 解决 mac安装或者更新第三方包安装不上的问题 mac OSX pip OSError: [Errno 1] Operation not permitted
- pip install django失败时的解决办法
- Mac OS X El Capitan (10.11) sudo pip install 报错 “OSError: [Errno 1] Operation not permitted”
- mac install pip
- window python3 安装pip和scrapy,lxml 过程和出错解决
- WIN下解决MySQL-Python模块pip install安装错误
- pip install 安装出现问题:UnicodeEncodeError: 'ascii' codec can't encode characters in position XX的解决办法
- 使用sudo pip install 安装python包出错的解决方法
- 【Python】使用pip install时出现UnicodeDecodeError错误解决方法
- 解决pip install的时候报错timed out的问题
- python基础===Windows环境下使用pip install 安装出错"Cannot unpack file"解决办法