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,如需转载请自行联系原作者







相关文章
|
24天前
|
异构计算 Python
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
170 1
|
24天前
|
人工智能 Shell Python
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
155 0
|
数据采集 中间件 关系型数据库
Mac系统通过brew安装mysql5.7后,启动报错的解决办法
Mac系统通过brew安装mysql5.7后,启动报错的解决办法
906 2
|
TensorFlow 算法框架/工具 Python
【Mac 系统】解决VSCode用Conda成功安装TensorFlow但程序报错显示红色波浪线Unable to import ‘tensorflow‘ pylint(import-error)
本文解决在Mac系统上使用VSCode时遇到的TensorFlow无法导入问题,原因是Python解析器未正确设置为Conda环境下的版本。通过在VSCode左下角选择正确的Python解析器,即可解决import TensorFlow时报错和显示红色波浪线的问题。
651 9
|
Linux Shell Python
centos执行pip3 install etcd3报错
centos执行pip3 install etcd3报错
|
缓存 Python
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-npf9报错
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-npf9报错
|
开发者 Python
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
1175 0
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
|
JavaScript Linux iOS开发
【Mac系统】Vscode使用LeetCode插件报错‘leetcode.toggleLeetCodeCn‘ not found
在Mac系统下使用VSCode的LeetCode插件时遇到“leetcode.toggleleetcodecn”命令找不到的错误解决方法,主要是通过从Nodejs官网下载并安装最新版本的Node.js来解决环境配置问题。
687 0
使用mac版本试用版Beyond过期报错,反复提示要注册的提示信息问题,暂时没有解决方案
使用mac版本试用版Beyond过期报错,反复提示要注册的提示信息问题,暂时没有解决方案
284 1
|
安全 网络安全 Python
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
2576 0