DISCLAIMER - I am new to the world of Django and Python. If the question sounds stupid, please bear with me.
OS - Windows 10
Python Version Installed - 3.7
In the windows command prompt, I am trying the following command to download django on my system.
pip install django
pip3 install django
Collecting django
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))': /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))': /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))': /simple/django/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))': /simple/django/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))': /simple/django/
Could not find a version that satisfies the requirement django (from versions: )
No matching distribution found for django
If anybody could help me out or show some direction that would be great. Thanks in advance.
DISCLAIMER 2 :- This is an office environment and not my personal system so there should be restrictions on the firewall and other such good stuffs.
You can try downloading Django unofficial binaries form https://www.lfd.uci.edu/~gohlke/pythonlibs/ (use ctrl + F to find the package)
and install using
pip install "path to downloaded wheel file"
Edit: Offline installation of Django worked with the OP as he did not like to install the unofficial binaries.
Downloaded pytz from https://pypi.org/project/pytz/#files
And then downloaded Django from https://pypi.org/project/Django/#files
Installed wheel files of pytz first and Django next using pip.
This is because your internet proxy is blocking it. So download the installable(.whl,tz) from the server and copy to your local and install it with
pip install <downloaded file name>
Related
I have installed python 3.8, and need to install pywin (pywin32)
However, pip cannot find it. Note, i have tried to install some other packages with pip install command in terminal before, but those don't work either.
A few possibly relevant data points:
new install of python 3.8.1
windows 10 x64
python 3.7 was previously installed on the machine
I'm using pycharm 2019.3.3. There in venv/Lib/site-packages it shows that setuptools and pip is installed.
I use the terminal in pycharm, since however it's the only console which let's me go to the path system C: ---> the normal cmd of windows is always on M:, even if I change directory, it always goes back to M: (I don't know why)....
What I tried:
*cmd -> netsh winhttp show proxy #As I thought the installation problems might relate to the proxy. But it doesn't because at work we don't use one, it's DirectAccess (no proxy).
*to install pywin32; Errorcode:
Collecting pywin32
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x000002189212F3A0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pywin32/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x000002189212FE20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pywin32/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x0000021892150880>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pywin32/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x0000021892150AC0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pywin32/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x00000218921507C0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pywin32/
Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32
*to install pypiwin32; Errorcode:
Collecting pypiwin32
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x000002670BE9FFA0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pypiwin32/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x000002670BE9FCD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pypiwin32/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x000002670BEC08B0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pypiwin32/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x000002670BEC0AF0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pypiwin32/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object
at 0x000002670BEC07F0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pypiwin32/
Could not find a version that satisfies the requirement pypiwin32 (from versions: )
No matching distribution found for pypiwin32
Can you help me please?
Also, if there is already one topic which is helpful, I would be happy about it. I wasted hours of searching this website, but there's too much...
How did I get to this issue:
I want to write a code with popup notification for the Windows taskbar. Therefore want to use win10toast but pip cannot install - I checked the requirements and it's necessary to install pywin32 and setuptools first. So setuptools was pre-installed, therefore ok.
But pywin32 installation is not possible.
If you could offer me a better solution than win10toast this would also be helpful ;-)
A million thanks! Wish you a happy day :)
You could use plyer instead of win10toast just install it And write
From plyer import notification
a= Notification.notify(title= ,message=,icon=,time=)
I am getting following error while trying to use 'pysftp' module in Jupyter Notebook:
End Goal: Download files from Unix server onto Windows folder automatically through a web-based application written in Python.
In this process, when I try to connect to WINSCP in order to allow python code to login to Unix server(username#hostname), I used 'pystftp' module however I get below error message:
Error Message: ModuleNotFoundError: No module named 'pysftp'
Action taken:
pip list - to view the already installed packages in python; I doesn't show pysftp
pip install pysftp - to install pysftp module; get below error when ran this in jupyter notebook
error message:
Collecting pysftp
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A34A2400>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BC4A8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BCE80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BCEB8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BCE48>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
Could not find a version that satisfies the requirement pysftp (from versions: )
No matching distribution found for pysftp
Request:
Please direct and help me achieve my end goal.
I am writing a code in Jupyter Notebook
Thanks,
Puneet
At first suggestion: You should check the location for PYTHON installation path and from that directory go to cmd -> and type: pip installs pysftp. If the installation is successful then the problem is in your interpreter selection where your scripts are running.
While installing any package for python in pycharm. Getting below error:-
Collecting py2neo
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 0x7fb8e2e15780>: Failed to establish a new connection: [Errno 111] Connection refused',))': /simple/py2neo/
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 0x7fb8e2e155f8>: Failed to establish a new connection: [Errno 111] Connection refused',))': /simple/py2neo/
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 0x7fb8e2e15898>: Failed to establish a new connection: [Errno 111] Connection refused',))': /simple/py2neo/
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 0x7fb8e2e154a8>: Failed to establish a new connection: [Errno 111] Connection refused',))': /simple/py2neo/
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 0x7fb8e2e15400>: Failed to establish a new connection: [Errno 111] Connection refused',))': /simple/py2neo/
Could not find a version that satisfies the requirement py2neo (from versions: )
No matching distribution found for py2neo
I am experiencing exactly the same errors inside my Docker container, behind corporate Proxy. no matter which package I am trying to install.
I could nail it down to the following:
I am getting this error as soon as any proxy env var is set (either https_proxy or HTTPS_PROXY). The curious thing it doesn´t matter if this is the right proxy or not. Also, I experienced, that when one of these vars is set, pip seems to ignore what I pass via the --proxy switch during installation.
I got it working using the following workaround:
making sure that there is neither https_proxy (lowercase), not HTTPS_PROXY (uppercase) environment var is set.
run pip install using the following command
pip3 --proxy=http://<proxyHost>:<proxyPort> install py2neo
While this workaround works for me, I would still be interested to find a resolution for this, as
I am really curious about what´s going there
it is kind of annoying to have to specify the proxy in the command inside of the Dockerfile
I cant install any packages through pip it shows me error:-
PS
C:\WINDOWS\system32> pip install virtualenv
Collecting virtualenv
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 0x0423C5D0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
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 0x0423C3B0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
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 0x0423C290>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
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 0x0423C090>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
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 0x0423C7F0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
Could not find a version that satisfies the requirement virtualenv (from versions: )
No matching distribution found for virtualenv
This type of Error occurs while updating the pip.
But can be resolved by using following commands.
step 1:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
step 2:
python3 get-pip.p --force-reinstall
step 3:
Now check the pip version:
pip3 --version
This can happen with older versions of pip. Try to upgrade it with pip install --upgrade pip
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