pythonpycharmpypiconcurrent.futures

windows pip cant install concurrent due to 'could not find a version that satisfies the requirement' but pycharm can


I am writing a small script to do multithreading examples, but I can't get it to work outside the pycharm environment. When I run it in pycharm (community edition) it is able to install the concurrent.futures and execute the code perfectly. But since I want to see the threads in the resource manager I need to run it outside the pycharm.

Now my python on windows is 3.11:

python -V
Python 3.11.2
                                                                                                                                                                                                                                        
pip -V
pip 24.3.1 from C:\Program Files\Python311\Lib\site-packages\pip (python 3.11)
             

my python venv interpreter on pycharm is 3.11 too.

pycharm interpreter 311 my code uses concurrent.futures module, and when I do it from pycharm it installs it correctly without issues. import the package

and yet when I try to do it on windows it doesn't work.

C:\WINDOWS\system32>pip install concurrent
ERROR: Could not find a version that satisfies the requirement concurrent (from versions: none)
ERROR: No matching distribution found for concurrent

I have tried the following: Could not find a version that satisfies the requirement <package>

I dont know if the package name is wrong or something? But if the package name worked in pycharm it should work in pip as well right?

I also tried to downgrade to py 3.8 but I got the same error

C:/Users/jhg/AppData/Local/Programs/Python/Python38/scripts/pip install concurrent
    ERROR: Could not find a version that satisfies the requirement concurrent (from versions: none)

I tried to search concurrent on pypi but I see only a backport for python2, but if there is a backport for python2 where is the python 3 version and how did my pycharm know where to find it?

here is the pip install verbose output:


  26/12/2024   21:25.44   /drives/c/Users/jhg/PycharmProjects/BulkSFTP   master  pip3 -vvv install concurrent
Using pip 24.3.1 from C:\Program Files\Python311\Lib\site-packages\pip (python 3.11)
Defaulting to user installation because normal site-packages is not writeable
Created temporary directory: C:\Users\jhg\Documents\MobaXterm\slash\tmp\pip-build-tracker-00c_7tot
Initialized build tracking at C:\Users\jhg\Documents\MobaXterm\slash\tmp\pip-build-tracker-00c_7tot
Created build tracker: C:\Users\jhg\Documents\MobaXterm\slash\tmp\pip-build-tracker-00c_7tot
Entered build tracker: C:\Users\jhg\Documents\MobaXterm\slash\tmp\pip-build-tracker-00c_7tot
Created temporary directory: C:\Users\jhg\Documents\MobaXterm\slash\tmp\pip-install-a68ugnfx
Created temporary directory: C:\Users\jhg\Documents\MobaXterm\slash\tmp\pip-ephem-wheel-cache-l8k7j7vf
1 location(s) to search for versions of concurrent:
* https://pypi.org/simple/concurrent/
Fetching project page and analyzing links: https://pypi.org/simple/concurrent/
Getting page https://pypi.org/simple/concurrent/
Found index url https://pypi.org/simple/
Looking up "https://pypi.org/simple/concurrent/" in the cache
Request header has "max_age" as 0, cache bypassed
No cache entry available
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/concurrent/ HTTP/1.1" 404 13
Status code 404 not in (200, 203, 300, 301, 308)
Could not fetch URL https://pypi.org/simple/concurrent/: 404 Client Error: Not Found for url: https://pypi.org/simple/concurrent/ - skipping
Skipping link: not a file: https://pypi.org/simple/concurrent/
Given no hashes to check 0 links for project 'concurrent': discarding no candidates
ERROR: Could not find a version that satisfies the requirement concurrent (from versions: none)
Remote version of pip: 24.3.1
Local version of pip:  24.3.1
Was pip installed by pip? True
ERROR: No matching distribution found for concurrent
Exception information:
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "C:\Program Files\Python311\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 174, in _add_to_criteria
    raise RequirementsConflicted(criterion)
pip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('concurrent')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 399, in resolve
    raise ResolutionImpossible(e.criterion.information)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('concurrent'), parent=None)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\cli\base_command.py", line 105, in _run_wrapper
    status = _inner_run()
             ^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\cli\base_command.py", line 96, in _inner_run
    return self.run(options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 67, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\commands\install.py", line 379, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 104, in resolve
    raise error from e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for concurrent


Solution

  • There is no PyPI package called concurrent meaning that you can't pip install any such package.

    What we have is concurrent.futures which is part of Python's standard library. You don't have to install it as it comes with your Python installation. You simply import concurrent.futures and use it.

    However for Python 2 users, there is a backport of the concurrent.futures standard library module to Python 2 available on PyPI called futures. Python 2 users can pip install futures and use it.