【问题标题】:Cant install pip PyMySQL using Anaconda prompt无法使用 Anaconda 提示安装 pip PyMySQL
【发布时间】:2020-08-29 18:25:32
【问题描述】:

我尝试在 Anaconda 提示符下下载 pip install PyMySQL(我使用 Spyder 作为 IDE)。它不工作。我收到了这个错误。有谁知道如何解决它?我正在使用 Python 3.7.4 64 位版本。提前谢谢你:)

(base) C:\Users\AK>pip install PyMySQL
Collecting PyMySQL
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E5EC2F84C8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/pymysql/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E5EC30CC48>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/pymysql/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E5EC319408>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/pymysql/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E5EC319908>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/pymysql/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E5EC319B88>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/pymysql/
  ERROR: Could not find a version that satisfies the requirement PyMySQL (from versions: none)
ERROR: No matching distribution found for PyMySQL

【问题讨论】:

    标签: python pip anaconda pymysql


    【解决方案1】:

    这可能是由于您计算机上的防病毒软件或其他程序干扰了网络连接(请参阅pip install is not working)。

    我可以通过以下方式安装 PyMySQL:

    pip install PyMySQL
    

    有几种可能的解决方案。

    1. 使用 conda 安装:conda install pymysql
    2. 下载 PyMySQL 的 wheel 并使用该文件进行安装。
    3. 如果杀毒软件确实发挥了作用,那么我不知道该怎么办,但 google 是你的朋友。

    【讨论】:

    • 他们正在使用 anaconda,这对于使用哪个版本的 python 也非常明确
    • @jakub 如果我使用你的命令,我会得到:'python3' 不是内部或外部命令、可运行程序或批处理文件。
    • @AK28 - 然后使用pip install。不过,我确实建议使用 python -m pip 语法,因为它更明确地说明了您指的是哪个 pip。这可以防止安装到错误的环境中。
    • @jakub 最后!解决方案 2 对我有用。非常感谢!
    猜你喜欢
    • 2020-01-17
    • 2018-12-28
    • 1970-01-01
    • 2014-11-07
    • 2014-10-17
    • 2019-12-27
    • 1970-01-01
    • 2017-11-19
    • 2020-05-10
    相关资源
    最近更新 更多