Unable to install Python-docx package

2.1k Views Asked by At

I tried to install python-docx package and get the error below.

C:\Program Files\Anaconda3\Scripts>pip install python-docx

Collecting python-docx
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E9A398CD68>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/python-docx/

 Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E9A398C240>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/python-docx/

Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E9A398C828>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/python-docx/

Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E9A398C438>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/python-docx/

Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001E9A39819B0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/python-docx/
  Could not find a version that satisfies the requirement python-docx (from versions: )
No matching distribution found for python-docx
2

There are 2 best solutions below

0
On

do "where pip" on your cmd you will get path of pip (pip-path) then do, "pip-path install package" or you can directly use "conda install package-name" since you have anaconda.

0
On

My only thought would be that pip had the wrong website and it can't connect to the page thus not being able download the package. So maybe try downloading it straight from the website:https://pypi.python.org/pypi /python-docx. Hope I helped.

-Zeus