i'm trying to install pygame package on my computer which one is not connected to internet.
(env : windows10, python 3.9(anaconda))
so i downloaded a "pygame-2.1.2.tar" file from www.pypi.org and then tried to install it
from cmd with "python setup.py install" commend.
then it shows error message like below
===============================================================================
(base) C:\pythonpackage\pygame-2.1.2>python setup.py install
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Making dir :prebuilt_downloads:
Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip
d561079ec622b0bab5a9e02976f5d540b0622da
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 174, in
_new_conn
conn = connection.create_connection(
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\connection.py", line 73,
in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "C:\ProgramData\Anaconda3\lib\socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11002] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 699,
in urlopen
httplib_response = self._make_request(
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 382,
in _make_request
self._validate_conn(conn)
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 1010,
in _validate_conn
conn.connect()
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 358, in
connect
conn = self._new_conn()
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 186, in
_new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at
0x00000237AF075250>: Failed to establish a new connection: [Errno 11002] getaddrinfo
failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", line 439, in
send
resp = conn.urlopen(
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 755,
in urlopen
retries = retries.increment(
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\retry.py", line 574, in
increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.libsdl.org', port=443):
Max retries exceeded with url: /release/SDL2-devel-2.0.18-VC.zip (Caused by
NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000237AF075250>:
Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\pythonpackage\pygame-2.1.2\setup.py", line 359, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\pythonpackage\pygame-2.1.2\buildconfig\config.py", line 225, in main
deps = CFG.main(**kwds)
File "C:\pythonpackage\pygame-2.1.2\buildconfig\config_win.py", line 497, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\pythonpackage\pygame-2.1.2\buildconfig\download_win_prebuilt.py", line 290, in
ask
update(x86=x86, x64=x64)
File "C:\pythonpackage\pygame-2.1.2\buildconfig\download_win_prebuilt.py", line 273, in
update
download_prebuilts(download_dir, x86=x86, x64=x64)
File "C:\pythonpackage\pygame-2.1.2\buildconfig\download_win_prebuilt.py", line 124, in
download_prebuilts
download_sha1_unzip(url, checksum, temp_dir, 1)
File "C:\pythonpackage\pygame-2.1.2\buildconfig\download_win_prebuilt.py", line 47, in
download_sha1_unzip
response = requests.get(url)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 542, in
request
resp = self.send(prep, **send_kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 655, in
send
r = adapter.send(request, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", line 516, in
send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.libsdl.org', port=443):
Max retries exceeded with url: /release/SDL2-devel-2.0.18-VC.zip (Caused by
NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000237AF075250>:
Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))
===============================================================================
please let me know how to install pygame on offline environment.
i need your help!! please~~
Solution 1 (It works for me; simple but tricky)
My first suggestion is just using .whl file. You can download pygame.whl, which is another type of installation file, from another computer and move the two files to the computer with no internect connection.
You can download the files here:
.whl file for Window & Python3.9 (for example,
pygame-2.1.2-cp39-cp39-win_amd64.whl):
https://pypi.org/project/pygame/#files
Actually, .whl is a zipfile. You can unzip the .whl file then you can see three folders: pygame, pygame-2.1.2.data, and pygame-2.1.2.dist-info. You just need pygame folder.
You can copy the folder and paste it to your python project. Then you can simply import pygame. I just tried this way and it works for me. (I even tried to run an example game)
Solution 2
Another suggestion is to download pip and pygame.whl from another computer and move the two files to the computer with no internect connection.
You can download the files here:
pip (for example, pip-22.0.3.tar.gz): https://pypi.org/project/pip/#files
.whl file for Window & Python3.9 (for example,
pygame-2.1.2-cp39-cp39-win_amd64.whl):
https://pypi.org/project/pygame/#files
After downloading and moving the two files to the computer with no internect connection, you first unzip the pip-22.0.3.tar.gz and install pip by tying following command inside of the pip folder (pip also has setup.py file):
python setup.py install
Now, pip has been installed. Then, install using the .whl file using pip in the folder that .whl file exist.
python -m pip install pygame-2.1.2-cp39-cp39-win_amd64.whl
I hope it help you emjoy pygame.
you can run command: pip install pygame
Related
I am running my fastapi via Docker, here is the main.py
import sys
from fastapi import FastAPI
from src.redactor import DSARRedaction
app = FastAPI()
#app.get("/")
async def run_redaction():
DSARRedaction("kulveer").run_redaction()
return {"message": "Redaction Completed"}
and here is the Dockerfile
FROM python:3.8-slim-buster
WORKDIR /app
COPY requirements.txt .
RUN apt-get update
RUN apt-get install -y python3-opencv
# Install dependencies for textract
RUN apt-get install -y ghostscript python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig \
libpulse-dev zlib1g-dev qpdf
RUN apt -y install tesseract-ocr
RUN apt -y install libtesseract-dev
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY . .
RUN python3 -m spacy download en_core_web_lg
EXPOSE 50
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "50"]
I am trying to run the following python script as I just want to be able to get the URL via python without having to click on it.
import requests
requests.get('http://0.0.0.0:50/')
But every time I try to run that code to request the API, I get the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/usr/local/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f34d008fca0>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='0.0.0.0', port=50): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f34d008fca0>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "x.py", line 3, in <module>
requests.Session().get('http://0.0.0.0:50')
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=50): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f34d008fca0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Any ideas on why this is happening?
Access your endpoint at http://localhost:50 instead of http://0.0.0.0:50 so it should be
import requests
requests.get('http://localhost:50/')
I am trying my hands on SPACY library for NLP and facing issues while installing. Following are the steps taken:
!pip3 install spacy
!python -m spacy download en_core_web_sm
I am getting following errors.
What needs to be done to fix it?
2021-03-10 14:12:10.063797: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-03-10 14:12:10.064255: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\ssl_.py", line 428, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\ssl_.py", line 472, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\spacy\__main__.py", line 4, in <module>
setup_cli()
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\spacy\cli\_util.py", line 68, in setup_cli
command(prog_name=COMMAND)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\typer\main.py", line 497, in wrapper
return callback(**use_params) # type: ignore
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\spacy\cli\download.py", line 35, in download_cli
download(model, direct, sdist, *ctx.args)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\spacy\cli\download.py", line 67, in download
compatibility = get_compatibility()
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\spacy\cli\download.py", line 78, in get_compatibility
r = requests.get(about.__compatibility__)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\bj\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
I also tried this option, but this is not working:
PS C:\Users\bj> pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='github-releases.githubusercontent.com', port=443): Max retries exceeded with url: /84940268/85ec3200-48aa-11e9-9878-337412e36828?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210310%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210310T163448Z&X-Amz-Expires=300&X-Amz-Signature=1f872d0cc838d305c2ab952ec0a685a22a62894f38e0bd03b6920692d9755cce&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=84940268&response-content-disposition=attachment%3B%20filename%3Den_core_web_sm-2.1.0.tar.gz&response-content-type=application%2Foctet-stream (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
Python version 3.8, Windows 10
Add https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz to your requirements.txt file.
Next, install using pip3 install --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host github.com -r requirements.txt
I am trying to install psutil on my Raspbian VM where I am working on the python code. Later I am planning to upload it to pi.
Every time when I try to install psutil, it gives following error.
pi#raspberry:~ $ pip3 install psutil
Collecting psutil
Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connection.py", line 138, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/connection.py", line 75, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 594, in urlopen
chunked=chunked)
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 350, in _make_request
self._validate_conn(conn)
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 837, in _validate_conn
conn.connect()
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connection.py", line 281, in connect
conn = self._new_conn()
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connection.py", line 147, in _new_conn
self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb6066dac>: Failed to establish a new connection: [Errno -2] Name or service not known
Here is my pastebin as I can't upload entire error log https://pastebin.com/EyWVmuju
I did some research and realized I need to install 'python-dev' however it didn't helped.
pi#raspberry:~ $ sudo apt-get install python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-dev is already the newest version (3.5.3-1).
python3-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Any help will be appreciated.
Thanks.
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)
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
I am getting the following error while installing graphlab in ubuntu 14.04. I already spent lot of time to solve this problem by googling it. can any one help me to solve this prblem.
Error:
ramy#ramy-Aspire-4739Z:~$ sudo pip install --upgrade https://get.graphlab.com/GraphLab-Create/2.1/mohangtrichy#gmail.com/<KEY>/GraphLab-Create-License.tar.gz
Downloading/unpacking https://get.graphlab.com/GraphLab-Create/2.1/mohangtrichy#gmail.com/<KEY>/GraphLab-Create-License.tar.gz
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1198, in prepare_files
do_download,
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, in unpack_url
self.session,
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 546, in unpack_http_url
resp = session.get(target_url, stream=True)
File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py", line 467, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py", line 455, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py", line 558, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/adapters.py", line 385, in send
raise SSLError(e)
SSLError: [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
Storing debug log for failure in /home/ramy/.pip/pip.log
ramy#ramy-Aspire-4739Z:~$
Requests can verify SSL certificates for HTTPS requests, just like a
web browser. To check a host’s SSL certificate, you can use the verify
argument:
And if you want to avoid the SSLError you can find the requests part and change verify to False:
requests.get('https://google.com', verify=False)
Another way reinstall certifi module:
sudo pip uninstall -y certifi
sudo pip install certifi==2015.04.28
Have a look at these questions:
Python Requests throwing up SSLError
SSLError: bad handshake, Python requests