无法使用 Anaconda 提示安装 pip PyMySQL

Cant install pip PyMySQL using Anaconda prompt

我尝试在我的 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

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

我可以使用以下命令安装 PyMySQL:

pip install PyMySQL

有几个可能的解决方案。

  1. 使用 conda 安装:conda install pymysql
  2. 下载 PyMySQL 的 wheel 并使用该文件安装它。
  3. 如果防病毒软件真的起作用了,那么我不知道该怎么办,但是 google 是你的朋友。