0

I am using Pycharm and i need to install a package called pycrypto. But when i tried it is giving an error like

Collecting pycrypto

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pycrypto/ Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pycrypto/ Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pycrypto/ Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pycrypto/ Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pycrypto/

Could not find a version that satisfies the requirement pycrypto (from versions: ) No matching distribution found for pycrypto

FYI

I tried this on both pycharm and python command line but both giving this same error. i am using python 2.7. Help me with the issue. Thanks in advance.

2 Answers2

1

Reinstall openssl by

brew uninstall openssl
brew install openssl

As suggested by Homebrew, do the following:

echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
0

If you look at the exception, you can see that the connection to pypi.python.org fails.

According to status.python.org, PyPI is up and running and my own tests confirm that. There seems to be a problem with your network connection.

If you can access the URL https://pypi.python.org/simple/pycrypto/ in the browser, check if you have to configure pip to use a proxy.

Daniel Hepper
  • 28,981
  • 10
  • 72
  • 75