mac使用pip3报错

简介:

mac使用pip3报错

ImportError: cannot import name 'HTTPSHandler'


解决方法


down vote

It seems your pip requires HTTPSHandler which is part of SSL library.

OSX

On OS X you should link OpenSSL during Python installation (See: #14497).

For Python 2:

brew reinstall python --with-brewed-openssl
pip install --upgrade pip

For Python 3:

brew reinstall python3 --with-brewed-openssl
pip3 install --upgrade pip

You could have multiple Python instances together, to list them run:

brew list | grep ^python

Or list your version via ls -al /usr/local/lib/python*.


参考链接:

https://stackoverflow.com/questions/20688034/importerror-cannot-import-name-httpshandler-using-pip


https://stackoverflow.com/questions/41489439/pip3-installs-inside-virtual-environment-with-python3-6-failing-due-to-ssl-modul


https://stackoverflow.com/questions/20688034/importerror-cannot-import-name-httpshandler-using-pip


pip指定pip源安装:

./obpy17/bin/pip3 install -i http://pypi.douban.com/simple/ django  --trusted-host pypi.douban.com


      本文转自Tenderrain 51CTO博客,原文链接:http://blog.51cto.com/tenderrain/1956118,如需转载请自行联系原作者







相关文章
|
4月前
|
定位技术
Mac电脑报错“托管配置文件格式不正确”的解决方法
Mac电脑报错“托管配置文件格式不正确”的解决方法
129 0
|
5月前
mac zsh: command not found: pip解决方法
mac zsh: command not found: pip解决方法
243 0
|
3月前
pip install -U weditor 安装报错 error: subprocess-exited-with-error
pip install -U weditor 安装报错 error: subprocess-exited-with-error
71 0
|
4月前
|
iOS开发 MacOS
MAC OS更新系统后IDEA中的SVN报错无法使用
MAC OS更新系统后IDEA中的SVN报错无法使用
|
1月前
|
iOS开发 MacOS Python
Mac安装pip报错的解决办法
Mac安装pip报错的解决办法
|
5月前
|
Python
pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)
pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)
252 1
|
4月前
|
iOS开发 MacOS
mac AnyConnect 连接报错 Posture Assessment Failed: Hostscan Initialize error.
mac AnyConnect 连接报错 Posture Assessment Failed: Hostscan Initialize error.
mac AnyConnect 连接报错 Posture Assessment Failed: Hostscan Initialize error.
|
8月前
|
网络安全 数据安全/隐私保护
【已解决】mac端 sourceTree 解决remote: HTTP Basic: Access denied报错
又是在一次使用sourcetree拉取或者提交代码时候,遇到了sourcetree报错; 排查了一会,比如查看了SSH keys是否有问题、是否与sourcetree账户状态有问题等等,最终才发现并解决问题
|
8月前
|
Python
pip安装模块报错ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443): Read timed
pip安装模块报错ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443): Read timed
159 0
|
8月前
Mac M1 报错 ld: library not found for -lSystem
Mac M1 报错 ld: library not found for -lSystem
250 0