Issues when pip install libraries in my host machine - python

I am trying to use pip (9.0.1) in my macosx (python 2.7.10) but whenever I install something I keep getting these errors:
Collecting flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa310>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa110>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa550>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa850>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8facd0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Some guy mentioned that might be related to the firewall so I connected to the network via my phone and then I execute pip in this case things seem to get installed but I still get all this "retrying" before it downloads every package like:
Collecting flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa310>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa110>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa550>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8fa850>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b8facd0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/flask/
Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB)
100% |████████████████████████████████| 92kB 1.8MB/s
Collecting itsdangerous>=0.21 (from flask)
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by '
Any idea why I get these messages?

pip has proxy option. Please use it.
pip install flask --proxy=<proxy address>
From pip --help
--proxy Specify a proxy in the form [user:passwd#]proxy.server:port.
Read about proxy address here.
Refer this to setup proxy on mac os.

Related

A pip subprocess error when I create an environment for one project in its root folder

Running Ubuntu 18.04 LTS as WSL2 on Win10, I need to create an environment to install Devito on my system. So, in a root folder of this project I do:
(base) quant#NB-W-I-NIKONENKO:~/devito$ conda env create -f environment-dev.yml
and get this:
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: \ Ran pip subprocess with arguments:
['/home/quant/anaconda3/envs/devito/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/quant/devito/condaenv.r9s6c4x4.requirements.txt']
Pip subprocess output:
Requirement already satisfied: pip>=9.0.1 in /home/quant/anaconda3/envs/devito/lib/python3.9/site-packages (from -r /home/quant/devito/requirements.txt (line 1)) (21.2.4)
Pip subprocess error:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c959d970>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c959d5b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c959df10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c95c5100>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c95c52b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f2bc10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f2be20>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f32040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f321c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f32370>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy>1.16 (from versions: none)
ERROR: No matching distribution found for numpy>1.16
failed
CondaEnvException: Pip failed
The next installation commands should be:
source activate devito
which works, and the next:
pip install -e .
which shows the following:
Obtaining file:///home/quant/devito
Requirement already satisfied: pip>=9.0.1 in /home/quant/anaconda3/envs/devito/lib/python3.9/site-packages (from devito==4.6.2+60.g9b765d0d6) (21.2.4)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa7509e1040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4d9d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4d880>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4d190>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4dca0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy>1.16 (from devito) (from versions: none)
ERROR: No matching distribution found for numpy>1.16
So, I can not install the package correctly and implement the final command:
conda update - all –yes
I noticed that base Python version is 3.7.6 and after the source activation python version is 3.9.7 (I am not sure if it helps but I really struggled with this problem).
Here is the link for installation instructions for the Devito
https://medium.com/#soulfoodpst/install-devito-on-windows-a-tool-for-automatic-programming-3def3949e5c8

Fix " Could not find a version that satisfies the requirement boto3 (from versions: ) No matching distribution found for boto3"

I'm struggling installing installing Boto3 library.
Python version: 3.6.12
pip version 9.0.1
Server: Redhat 7.9 (Maipo) , Fedora.
I tried different comibnation to get the boto3 library:
pip3 install boto3
pip3 install boto
pip3 install --extra-index-url https://pypi.python.org/simple boto3
but always I have the same error.
Any idea?
My code:
sla82716:/home/pa009999/scriptDirectory $ pip3 install boto
Collecting boto
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f74e10>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f74208>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f742b0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f74320>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f743c8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
Could not find a version that satisfies the requirement boto (from versions: )
No matching distribution found for boto
sla82716:/home/pa009999/scriptDirectory $ pip3 install boto3
Collecting boto3
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642f98>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642438>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642400>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a56420b8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642630>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Could not find a version that satisfies the requirement boto3 (from versions: )
No matching distribution found for boto3
sla82716:/home/pa009999/scriptDirectory $ pip3 install --extra-index-url https://pypi.python.org/simple boto3
Collecting boto3
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85358>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85828>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85898>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85ef0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85198>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
Could not find a version that satisfies the requirement boto3 (from versions: )
No matching distribution found for boto3
It looks like you cannot resolve the hostname. Try adding the following line (Google nameserver)
nameserver 8.8.8.8
to the /etc/resolv.conf file (e.g., by using nano /etc/resolv.conf). You can only add three nameservers, so you might have to delete/change one line if there are already three nameservers in the file.
Afterwards, ping google.com should work and pip install boto3 as well.

How do we connect to snowflake using python connector

Microsoft Windows [Version 10.0.18363.1082]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\rkumarsah>pip install cx_oracle
Requirement already satisfied: cx_oracle in c:\programdata\anaconda3\lib\site-packages (8.0.1)
C:\Users\rkumarsah>pip install snowflake.connector
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017F3AA38130>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/snowflake-connector/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017F3A9BEA30>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/snowflake-connector/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017F3A9BEFD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/snowflake-connector/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017F3A9BEDF0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/snowflake-connector/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017F3A9BE970>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/snowflake-connector/
ERROR: Could not find a version that satisfies the requirement snowflake.connector (from versions: none)
ERROR: No matching distribution found for snowflake.connector
You aren't using the correct name when installing the connector. Change your pip command to:
pip install snowflake-connector-python
See documentation here

Error in installing Flask using pip command in windows

I tried to install Flask as well as virtualenv using pip command in windows command prompt but below error is showing. How can I fix this?
C:\Users\anupa>pip install Flask
Collecting Flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x06620E50>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x06620DF0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x06620C30>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x06620E10>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x06620C90>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/flask/
Could not find a version that satisfies the requirement Flask (from versions: )
No matching distribution found for Flask
Try using the pip command,
$ pip install --proxy your_proxy_path Flask

Getting error while installing autocorrect in python 3.6 (Windows)

I need to use autocorrect package in my project to correct the misspelled words.
for example:
from autocorrect import spell
spell('gruop')
But while trying to install autocorrect in python 3.6 as mentioned in https://github.com/phatpiglet/autocorrect. Am getting error as shown below:
(py36) C:\Users\Shylashree\Documents>pip install autocorrect
Collecting autocorrect
Cache entry deserialization failed, entry ignored
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001DD1747C3C8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/autocorrect/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001DD1747CBE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/autocorrect/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001DD1747CD30>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/autocorrect/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001DD1747C6A0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/autocorrect/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001DD1747C7B8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/autocorrect/
Could not find a version that satisfies the requirement autocorrect (from versions: )
No matching distribution found for autocorrect
Can anyone please tell me that how to sort out this error? and also suggest me is any other packages there to correct the misspelled words in python 3.6?

Categories

Resources