1

Can someone kindly assist?I am having issues with updating or installing any python package using pip or conda

Below is the error message received:

INput:

(venv) C:\Users\cted\PycharmProjects\crawler>python -m pip install pandas

Output:

(venv) C:\Users\cted\PycharmProjects\crawler>python -m pip install pandas
Collecting pandas
Exception:
Traceback (most recent call last):
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\packages\urllib3\connectionpool.py", line 589, in urlopen
self._prepare_proxy(conn)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\packages\urllib3\connectionpool.py", line 797, in prepare_proxy
conn.connect()
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\packages\urllib3\connection.py", line 289, in connect
ssl_version=resolved_ssl_version)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\packages\urllib3\util\ssl.py", line 308, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\Users\cted\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "C:\Users\cted\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 814, in init
self.do_handshake()
File "C:\Users\cted\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "C:\Users\cted\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:833)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\adapters.py", line 423, in send
timeout=timeout
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\packages\urllib3\connectionpool.py", line 621, in urlopen
raise SSLError(e)
pip._vendor.requests.packages.urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:833)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\download.py", line 821, in unpack_url
hashes=hashes
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\download.py", line 659, in unpack_http_url
hashes)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\download.py", line 853, in _download_http_url
stream=True,
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip\download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "C:\Users\cted\PycharmProjects\crawler\venv\lib\site-packages\pip-9.0.1-py3.6.egg\pip_vendor\requests\adapters.py", line 497, in send
raise SSLError(e, request=request)
pip._vendor.requests.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:833)
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

this is not a duplicate

tekstar
  • 51
  • 10
  • Try running `pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org` to upgrade pip (and hopefully its dependencies) – FlyingTeller Aug 06 '18 at 09:41
  • Possible duplicate of [Not able to install Python packages \[SSL: TLSV1\_ALERT\_PROTOCOL\_VERSION\]](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version) – phd Aug 06 '18 at 11:51
  • @FlyingTeller: Didnt work i'm afraid. I have Been on this for almost a week. I thought it may have to do with corporate proxy but i now have admin and developer rights – tekstar Aug 06 '18 at 15:00
  • @tekstar Did you try to manually update the SSL and urllib3 libraryß – FlyingTeller Aug 07 '18 at 05:48
  • @FlyingTeller: Please can you instruct me on how to manually install ? thanks – tekstar Aug 07 '18 at 08:03
  • @tekstart download the `.whl` file from [pyopenssl Pypi page](https://pypi.org/project/pyOpenSSL/#files) and [urllib3 page](https://pypi.org/project/urllib3/#files) and then do `pip install ` followed by `pip install ` – FlyingTeller Aug 07 '18 at 08:22

1 Answers1

1

you are using the old version of pip. first update the pip package.

sudo python -m pip install --upgrade pip
then install the pandas package
python -m pip install pandas