0

I am using pip to install a python package "data classes" I am in an anaconda envirnment to do this and i get the error below:

pip install dataclasses
  File "/usr/local/bin/pip", line 8, in <module>
    load_entry_point('pip==1.5.2', 'console_scripts', 'pip')()
  File "/Library/Python/2.7/site-packages/setuptools-17.1.1-py2.7.egg/pkg_resources/__init__.py", line 558, in load_entry_point
  File "/Library/Python/2.7/site-packages/setuptools-17.1.1-py2.7.egg/pkg_resources/__init__.py", line 2682, in load_entry_point
  File "/Library/Python/2.7/site-packages/setuptools-17.1.1-py2.7.egg/pkg_resources/__init__.py", line 2355, in load
  File "/Library/Python/2.7/site-packages/setuptools-17.1.1-py2.7.egg/pkg_resources/__init__.py", line 2361, in resolve
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/__init__.py", line 11, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/download.py", line 22, in <module>
    from pip._vendor import requests, six
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/_vendor/requests/__init__.py", line 53, in <module>
    from .packages.urllib3.contrib import pyopenssl
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py", line 62, in <module>
    ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

I saw here (Patch pyopenssl for sslv3 issue) to run pip install requests==2.6.0 but that gives the same error.

so i try to run sudo easy_install --upgrade pip which gives the error ImportError: No module named py31compat Therefore i run sudo pip install py31compat but i get the original error AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

Does any one know how to fix this? i think i need to update pip but i cant some how.

astrochris
  • 1,756
  • 5
  • 20
  • 42

0 Answers0