I'm trying to install a package on my raspberry py while using an SSH connection in the cmd but when I try to install one it give me this error.
pi#raspberrypi:~/pythonprojects $ sudo pip3 install guizero
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x753afb80>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/guizero/
It repeats that for a couple of times untit it gives up and gives me this error.
ERROR: Could not find a version that satisfies the requirement guizero
ERROR: No matching distribution found for guizero
I've tried the same thing with other packages and it does the same.
I tried installing django but didn't work. Instead it gave me this error...
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions')': /simple/django/
ERROR: Could not find a version that satisfies the requirement django (from versions: none)
ERROR: No matching distribution found for django
I tried to install other packages and modules but none of them could be installed. I reinstalled python and while doing that I lose all my previous packages. I had a project with PyQt5 which I could install successfully two weeks ago but after I reinstalled python my packages, modules, etc. where gone and now pip won't work I don't know why.
I tried changing my network and tried using my phone's hotspot but it didnt solve the problem. I tried giving the version name of the packages but that didn't work either.
My network doesn't have a proxy or is not connected to a vpn. I can download any other stuff but I just cannot download stuff with pip.
Thanks in advance!
I am fairly new to python so pardon my lack of jargon. I am trying to install the pulp module onto a work pc. I have downloaded the package from the pypi.org website into the program data folder on this pc.
I have tried:
pip install pulp
import pulp
python.exe -m pip install pulp
And this is the error that pops up every time.
pip install pulp
Collecting pulp
Note: you may need to restart the kernel to use updated packages.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 authenticationrequired'))': /simple/pulp/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 authenticationrequired'))': /simple/pulp/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 authenticationrequired'))': /simple/pulp/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 authenticationrequired'))': /simple/pulp/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 authenticationrequired'))': /simple/pulp/
ERROR: Could not find a version that satisfies the requirement pulp (from versions: none)
ERROR: No matching distribution found for pulp
I just would like to get pulp installed so that I can access the functions that come with it.
You need to tell pip about your proxy to use it that way. Something like this:
pip install --proxy http://user:password#host:port pulp
You may have to ask IT about the details.
Alternatively tell pip to install the file you downloaded:
pip install /path/to/downloaded/file
But you might find problems if it requires other packages and your internet connection is not working.
This ultimately may be a duplicate of the following, assuming local install:
python-pip-install-from-local-dir and
installing-python-packages-from-local-file-system-folder-to-virtualenv-with-pip
However, to answer in general, when you want to install a python module, you have a few options. The simple approach is generally to use pip (pip2 for explicit python2, pip3 for explicit python3) which automatically tries to download the module from the python module repositories.
As Goyo points out in their answer, you need to have access to the Internet for that to happen, and as such must specify settings to work through your proxy.
If, however, you have downloaded the module onto your computer already, you can also use it directly, in two ways.
Firstly, as per python-pip-install-from-local-dir, you can specify a package to install.
If you want a quick use, without pip involved (custom package, out of date, etc.), you can also locate your site packages folder with:
python -m site --user-site
Running without --user-site will also show the root site for your distro.
Extract your module and copy it into the user site folder, eg. for python3 "~/.local/lib/python3.4/site-packages". I create sym-links for python, python3 etc. to point to a generic python-site-packages directory, to help different versions locate the correct spot:
lrwxrwxrwx python -> /home/user/.local/lib/python-site-packages
lrwxrwxrwx python2 -> /home/user/.local/lib/python-site-packages
lrwxrwxrwx python2.7 -> /home/user/.local/lib/python-site-packages
lrwxrwxrwx python3 -> /home/user/.local/lib/python-site-packages
lrwxrwxrwx python3.4 -> /home/user/.local/lib/python-site-packages
drwxrwxr-x python-site-packages
Then you can include the module in your python code. However, having bypassed pip means that you won't necessarily have the latest module, and other modules will not know that the requirement has been met.
To check officially installed modules:
pydoc -g (python2)
pydoc3 -b (python3)
I presume that you are using a Windows machine.
Choose the Run as administrator option when you open cmd and just type pip, in order to ensure that your pip is working perfectly.
If you encounter no errors, then type pip install pulp and the module will be downloaded.
Simply import the module as import pulp
I am on my work PC (corporate proxy) and i am unable to install anything using pip install.
I have tried the following:
pip install QuantLib-Python
pip install --proxy 'webproxy.abc.123.nsroot.net:8080' QuantLib-Python
pip install --proxy "user:pass#webproxy.abc.123.nsroot.net:8080" QuantLib-
Python
no matter the library i always receive this message. I am on Python 3.7.3
Collecting QuantLib-Python
Note: you may need to restart the kernel to use updated packages.
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000002BEAFD0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed')': /simple/quantlib-python/
Retrying
No matching distribution found for QuantLib-Python
On my Home PC i ran the command pip install QuantLib-Python with the version of python and it worked perfectly.
please help!
I'm trying to install a Python pip package on Windows 10. Unfortunately, the proxy at my work is giving me trouble.
Things I've tried:
python -m pip install --proxy "http://sam.s1:1234#proxy.det.nsw.edu.au:8080"
python -m pip install --proxy http://sam.s1:1234#proxy.det.nsw.edu.au:8080
& 2. with the protocol changed to https
& 2. omitting the protocol, eg: python -m pip install --proxy sam.s1:1234#proxy.det.nsw.edu.au:8080
set HTTP_PROXY=sam.s1:1234#proxy.det.nsw.edu.au:8080 set HTTPS_PROXY=%HTTP_PROXY% set FTP_PROXY=%HTTP_PROXY%
Editing the proxy address for the HTTP_PROXY env variable in the same way described in steps 1 to 4.
Creating a pip.ini file at %APP_DATA%/pip/ with the following contents:
[global]
proxy = "http://sam.s1:1234#proxy.det.nsw.edu.au:8080"
trusted-host = pypi.python.org
Editing the proxy address in the pip.ini file in the same way described in steps 1 to 4.
They all give me similar errors such as:
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002A6F091B080>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))': /simple/django/
and
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002142813B128>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/django/
and
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/django/
Although sorting out once and for all how to download packages though the proxy would be nice, I'll settle for instructions on any methods that circumvent the proxy entirely, like downloading the package and compiling from source (I usually use Ubuntu, so I have no idea how to do this type of thing on Windows).
Other information:
The proxy is configured via a pac script
The package I'm currently trying to install is Django, but there will probably be others in the future.
I installed pip when I installed Python 3.6.3 (via the checkbox that says something like, do you also want to install pip as well as Python).
I know that pip is grabbing the settings from the .ini file, since I can change the output of $ pip list by setting a value for [list].
I have no idea about the proxy thing, but you can download Python packages from the Python Package Index (PyPI) and install them with pip. There's no need to compile from source in most cases, and definitely not with Django.
You can download Django here and then install it with pip install <path to downloaded package>.