【发布时间】:2020-08-21 02:50:29
【问题描述】:
想在mac上安装python 3.6和pip。
brew install python - 安装 python 3.7 并且 pip 将随之安装。
在线文档指导使用以下命令安装 python3.6 酿造安装https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
但这并没有同时安装 pip,python3 get-pip.py 也失败并出现以下 SSL 证书错误。
python3 get-pip.py
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
我可以知道在 Mac 上安装 python 3.6 的正确方法以及正确的 pip 吗?
【问题讨论】:
-
您现在是否在系统上同时安装了python3.7和python3.6?
-
python3 -V带给你什么? -
python3 -V Python 3.6.5
-
你能测试一下
pip模块是否与 Python 3.6 一起安装了吗?试试python -m pip,看看你是否收到错误,或者pip的帮助输出。 -
如果
python3是 3.6,那么您至少应该能够通过python3 -m pip install <whatever>获得 3.6pip。
标签: python python-3.x macos homebrew