Python Forum
Could not find a version that satisfies the requirement
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could not find a version that satisfies the requirement
#1
Greetings to those that work on Saturday ! Wink Big Grin

I noted I cannot install any of the modules from the network.
The error goes usually like this:

ERROR: Could not find a version that satisfies the requirement wmi (from versions: none)
ERROR: No matching distribution found for wmi

And a lot of lines like thisone:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001C3F8A81C70>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/wmi/

Does it mean I should find the correct version of Python for a specific module to be installed?
I have Python X-64 3.8xx installed
Thank you.
Reply
#2
'Any of the modules' any of what modules?
If you're trying to install a pypi package, from command line, use:
pip install packagename
Reply
#3
I tried to install a lot of modules -all failed.
Now I'm trying to install 'wmi' same story.
Was wondering if I should use a different method....

Thank you.
Reply
#4
I'm trying to get process IDs( Names) using Python.
I found a snippet online:
import wmi 
f = wmi.WMI()
print("pid   Process name")
 
for process in f.Win32_Process():
    print(f"{process.ProcessId:<10} {process.Name}")
It produces a bunch of errors. About some modules. including "WMI"
I installed "WMI" manually without errors using the command :
C:\Users\Someuser\Downloads\Python_Modules\WMI\dist\WMI-1.5.1 python setup.py install

But it still gives me tons of errors about some modules including "WMI".

Question,
is there any reliable way, without weeks to debugging "WMI/Win32API" modules, to get this working on Windows?
Or you guys just using Powershell and other means to do this?

Thank you.
Reply
#5
It is solved now.
I found module "psutil" does what I need.
And for some reason, I was be able to install it!
and the code I found online works fine.

import psutil
# List of current running process IDs.
pids = psutil.pids()
print("psutil.pids() = {0}".format(pids))

for proc in psutil.process_iter():
    try:
        pinfo = proc.as_dict(attrs=['pid', 'name'])
    except psutil.NoSuchProcess:
        pass
    else:
        print(pinfo)
Thank you!
Reply
#6
That error message is typical network(firewall ect..) problem on your side.
Can try with a proxy and see if that work.

Example check that pip is updated(newest 21.1.3) an how to use proxy.
Free Proxy List these can down fast so have try serval.
# Test pip
G:\div_code
λ pip -V
pip 21.1.3 from c:\python39\lib\site-packages\pip (python 3.9)

# Use proxy
G:\div_code
λ pip install --proxy="http://41.190.147.158:54018" wmi
Collecting wmi
  Using cached WMI-1.5.1-py2.py3-none-any.whl (28 kB)
Requirement already satisfied: pywin32 in c:\python39\lib\site-packages (from wmi) (300)
Installing collected packages: wmi
Successfully installed wmi-1.5.1
Other stuff to try.
python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
Can also try to install the newest Python version.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to install package caldwellpy and requirement txt file Samta282006 1 669 Dec-07-2023, 11:59 PM
Last Post: Larz60+
  How to find out from outside Python (in Windows) the current version of Python? pstein 4 680 Oct-04-2023, 10:01 AM
Last Post: snippsat
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 6,515 Sep-24-2021, 02:11 AM
Last Post: jonah88888
  Pip Could not find a version Fearless 3 2,417 Nov-14-2020, 01:57 PM
Last Post: Fearless
  could not find a version that satisfies the requirement geopy beginner1 2 2,974 Sep-05-2019, 08:35 AM
Last Post: beginner1
  Can I upload a new version without previously deleting ancient version sylas 6 4,183 Nov-08-2017, 03:26 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020