0

I tried to download the pip install PyMySQL on my Anaconda prompt (Im using Spyder as IDE). Its not working. I received this error. Someone who knows how to fix it? Iam using Python version 3.7.4 64-bit. Thank you in advance :)

(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
ManCity10
  • 119
  • 1
  • 12

1 Answers1

0

This could be due to an antivirus or some other program on your computer interfering with network connections (see pip install is not working).

I am able to install PyMySQL with the following:

pip install PyMySQL

There are a few possible solutions.

  1. Install with conda: conda install pymysql
  2. Download the wheel for PyMySQL and install it using that file.
  3. If antivirus is in fact playing a role, then I'm not sure what to do, but google is your friend.
jkr
  • 17,119
  • 2
  • 42
  • 68
  • they are using anaconda which is also very explicit about which version of python to use – Almog-at-Nailo May 13 '20 at 14:09
  • @jakub If I use your command I get : 'python3' is not recognized as an internal or external command, operable program or batch file. – ManCity10 May 13 '20 at 14:11
  • @AK28 - then use `pip install`. I do recommend using the `python -m pip` syntax though, because it is more explicit about which `pip` you are referring to. This can prevent installing into the wrong environment. – jkr May 13 '20 at 14:14
  • @jakub Finally! Solution 2 worked for me. Thank you very much! – ManCity10 May 13 '20 at 14:33