I'm trying to install linkedin libraries, but have problems with connection (due to some firewall restrictions) and I get an error:
C:\Python27\Scripts>pip install linkedin
Collecting linkedin
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connectio
n aborted.', error(10061, 'No connection could be made because the target machine actively refused it'))': /simple/linke
din/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connectio
n aborted.', error(10061, 'No connection could be made because the target machine actively refused it'))': /simple/linke
din/
Operation cancelled by user
Is there any chance to download linkedin libraries and install it locally?
If yes, can you provide any hints?
I've downloaded package from : https://pypi.python.org/pypi/python-linkedin/4.0
Regards,
Pawel
pip can install from downloaded file
pip install python-linkedin-4.0.tar.gz
Related
I'm not new with Python programming, today I tried to install Django using "pip install Django" on my computer.
I'm using Python 3.9.1, pip 20.2.3, PyCharm (community) 2020.3.2 .
I've tried everything, using pip3, trying to install libraries from pycharm termianl and from the pycharm interpreter configuration, I even format my computer(full foramt and the quick foramt) and nothing helped my.
I searched for similar problems here but all of them didn't work.
I get this problem over and over again (I tried to set the timeout to 100, and my internet connection is good and fast enough): (in this tryout I've tried to install numpy library, I get the same problem with every library that I tried)
(venv) C:\Users\achik\PycharmProjects\first>pip install numpy
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("
HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("
HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("
HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("
HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnection
Pool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy
Please help me, I'm about to lose my mind
UPDATE:
I formatted my computer and reinstall windows 10, installed python
3.7 and older version of PyCharm and it didn't work.
I formatted again my pc and installed Ubuntu 18.04 lts and again I have the same problem.
PLEASE help me!
I had the same problem. Sometimes it is because of internet connection and sometimes cmd working so slow.
If your antifilter is open, close it before executing commands on cmd.
And whenever you faced this problem close cmd and run it as admin again...
you can install needed packages without using pip as well.
For example download a suitable version of numpy and save it on C:\Python\Tools\script and run it using cmd.
In Pycharm sometime this type of issue happens due to their venv file, if possible then please remove venv file from pycharm directory any add python in the environment variable
and try to install NumPy from CMD.
I hope this will resolve your issue, I was also facing the same issue and tried this & fortunately being solved.
I had this same error while installing django using pip. I solved it by disabling the cache
pip --no-cache-dir install <package name>
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 need to download a package using pip. I ran pip install <package> but got the following error:
[user#server ~]$ pip install sistr_cmd
Collecting sistr_cmd
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0cd90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0c290>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0c510>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0cf10>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0c190>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Could not find a version that satisfies the requirement sistr_cmd (from versions: )
No matching distribution found for sistr_cmd
I verified that the source of the problem is the network blocking most sites because I am working behind a proxy (required by the organization). To allow these downloads, I need to compile the list of urls of the source of the downloads and send it to the network admins to unblock.
According to pip documentation (cited and explained in brief in the pip Wikipedia article), “Many packages can be found in the default source for packages and their dependencies — Python Package Index (PyPI)," so I went to the PyPI page for Biopython and found the github repository and the required dependencies for the package. There are also download links on the PyPI page and I want to be sure that all sources for the download are allowed. So does pip install from the original source of a package (the github repository or wherever the original package is hosted), the packages listed in the PyPI page under downloads, or does it search through both?
Thank you in advance for the help.
It appears a network connection, later you may try below:
pip install sistr-cmd
See the difference between - and _ for more info check here
According to user abarnert:
"If you run pip with the --verbose flag, it will show you all the links it considers. Generally speaking, it goes to https://pypi.org/simple/{PACKAGE} first. That page will have links to downloads for wheels and source for all versions that the maintainer has uploaded, and it will look for the appropriate version's wheel by trying its links in order. Usually there is no github repo listed as a source.
If you want to install everything from github (or any other location) that you know, the simplest thing to do is to manually give the repo to pip instead of just the package names. Ideally, install everything you care about that way on a machine that isn't firewalled from most of the internet, build a requirements.txt file (as explained here), then copy that requirements file to your firewalled machine and try to install it."
Running pip install with the --verbose flag shows extensive detail about where the package is being pulled from and about the network connection and traceback.
I am trying to install django using pip but I am not able to do it. Is there any other way to install Django.
I tried like below.
pip install Django
But I got the below error.
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after
connection broken
by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x00000000041C8198>, 'Connection to
pypi.python.org timed out. (connect timeout=15)')': /simple/djando/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after
connection broken by
'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x00000000041C8160>, 'Connection to
pypi.python.org timed out. (connect timeout=15)')': /simple/djando/
Create a virtual environment and install django in it. If that doesn't work then try checking your python version and make sure its 3.4+, then upgrade the pip package, it should work after that.
I use a micro ec2 instance with python 2.7.10 installed.
When i try to install djangorestframework with "pip install djangorestframework", it failed and here is the log:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')'
The problem is pip will open a https connection to pyip. Re-check outbound security rule of the instance and add https rule