Install packages (pywin32, win10toast and many others) via pip install not possible - python

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=)

Related

Build python project as package without internet access

I have a python project I want to package. I can package the project with python -m build just fine when connected to the internet.
When I disconnect and try the same command, I get an error about pip being unable to find the package wheel:
(my-venv) [me#my-host my-project]$ python -m build
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools>=42, wheel)
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 0x7f5935bb4f10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a160>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a4c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a670>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
ERROR: Could not find a version that satisfies the requirement wheel
ERROR: No matching distribution found for wheel
This happens even if I install setuptools and wheel first.
How can I build my project without needing internet access at the time of building? Can I somehow make the isolated environment use my python cache?

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

ModuleNotFoundError: No module named 'pysftp'

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.

Unable to download Django 2.0.7 in windows 10

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>

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