【问题标题】:Installing python 3.6 on mac along with pip在 mac 上安装 python 3.6 和 pip
【发布时间】: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.6 pip

标签: python python-3.x macos homebrew


【解决方案1】:

我可以通过下载和安装 brew pkg 来安装 python 3.6 和 pip,

https://www.python.org/ftp/python/3.6.5/

感谢您的帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-09-04
    • 1970-01-01
    • 2017-09-25
    • 2018-08-27
    • 2017-07-16
    • 2017-07-28
    • 2021-09-16
    • 2018-09-30
    相关资源
    最近更新 更多