使用Anaconda提示符无法安装pip PyMySQL

问题描述 投票:0回答:1

我尝试在Anaconda提示符下下载pip安装PyMySQL(我使用Spyder作为IDE)。它不起作用。我收到此错误。谁知道如何解决? Iam使用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个回答
0
投票

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

我能够通过以下方式安装PyMySQL:

python3 -m pip install PyMySQL

相当于pip install PyMySQL,但更明确地说明了所使用的python版本。

有一些可能的解决方案。

  1. 使用conda安装:conda install pymysql
  2. 下载PyMySQL的转盘,然后使用该文件进行安装。
© www.soinside.com 2019 - 2024. All rights reserved.