Pylons Pyramid failing to install

289 Views Asked by At

I'm following this tutorial but when I get to the $VENV/bin/pip install "pyramid==1.10.1" waitress it gives me the following error:

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

I'm using a macSierra 10.13.5 running python 3.5.1 (under python3). I can see the package exists on pip because when I try to install in my machine it works. But it won't work when installing inside the virtual environment.

Can you help me, please? I'm going through this tutorial to understand how to run a legacy project I'll have to work on.

UPDATE: the output when running $VENV/bin/pip install "pyramid==1.10.1" -vvv

    Collecting pyramid==1.10.1
  Getting page https://pypi.python.org/simple/pyramid/
  Starting new HTTPS connection (1): pypi.org
  Could not fetch URL https://pypi.python.org/simple/pyramid/: connection error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
  1 location(s) to search for versions of pyramid:
  * https://pypi.python.org/simple/pyramid/
  Getting page https://pypi.python.org/simple/pyramid/
  Starting new HTTPS connection (2): pypi.org
  Could not fetch URL https://pypi.python.org/simple/pyramid/: connection error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
  Could not find a version that satisfies the requirement pyramid==1.10.1 (from versions: )
Cleaning up...
No matching distribution found for pyramid==1.10.1
Exception information:
Traceback (most recent call last):
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/commands/install.py", line 294, in run
    requirement_set.prepare_files(finder)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/req/req_set.py", line 334, in prepare_files
    functools.partial(self._prepare_file, finder))
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install
    more_reqs = handler(req_to_install)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/req/req_set.py", line 461, in _prepare_file
    req_to_install.populate_link(finder, self.upgrade)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/req/req_install.py", line 250, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/index.py", line 571, in find_requirement
    'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for pyramid==1.10.1
Starting new HTTPS connection (1): pypi.org
There was an error checking the latest version of pip
Traceback (most recent call last):
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
    body=body, headers=headers)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 341, in _make_request
    self._validate_conn(conn)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 761, in _validate_conn
    conn.connect()
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connection.py",line 238, in connect
    ssl_version=resolved_ssl_version)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py", line 279, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 376, in wrap_socket
    _context=self)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 747, in __init__
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 983, in do_handshake
    self._sslobj.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 628, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 370, in send
    timeout=timeout
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 574, in urlopen
    raise SSLError(e)
pip._vendor.requests.packages.urllib3.exceptions.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/utils/outdated.py", line 126, in pip_version_check
    headers={"Accept": "application/json"},
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 477, in get
    return self.request('GET', url, **kwargs)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/download.py", line 373, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 594, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 594, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 196, in resolve_redirects
    **adapter_kwargs
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/cachecontrol/adapter.py", line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/Users/andredx/Projects/python/quick_tutorial/env/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 431, in send
    raise SSLError(e, request=request)
pip._vendor.requests.exceptions.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)
1

There are 1 best solutions below

0
Michael Merickel On

You need to use the get-pip [1] script to install a newer version of pip. Yours is outdated enough that it can no longer talk to PyPI due to security upgrades over the past few years. This means that your version of pip is old enough that it cannot upgrade itself via pip install -U pip. You'll need to use the get-pip script.

https://packaging.python.org/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line