添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

{PS C:\Users\mathe.vscode\py> pip install random
ERROR: Could not find a version that satisfies the requirement random (from versions: none)
ERROR: No matching distribution found for random}
Someone can help me please? When I try to install some package with pip, that happens.
OBS.: I have pip version 23.0.1; python version 3.11.2; I use Windows 10.

As random is included with Python, as a part of the standard library of packages, you don’t (or shouldn’t) need to install it.

Run this:

import random
print(random.__all__)
              

You are welcome.

Rather than hijacking this thread with an unrelated question, it would be better for you to start a new thread and post you code, formatted, so that we can see what you are doing.

As an example, before you post, your message should look something like this:

```python
name = input("what is your name? ")
print(f"Hello {name}. How are you today?")

The marks are called ‘backtics’ and, on most keyboards, can be found at the LH side, just below the Esc key.

No worries. It’s good to see that you are searching for related threads, rather than simply starting a new thread for a question that has already been asked.

Welcome to the Forum :slight_smile:

[Diego Ramirez]
Feb '22

Maybe it is your Python version. I mean, if the SpeechRecognition does not support your Python, you can’t install it.

What is your Python version? You can find it by running py -V.

Hello Orion,

It looks like you are trying to install the SpeechRecognition package using pip, but are encountering an error message that says “no matching distribution found.” This can happen if the package you are trying to install is not available on the Python Package Index (PyPI), or if there are compatibility issues with your operating system or Python version.

Here are a few things you can try to resolve this issue:

  • Upgrade pip: It’s always a good idea to make sure you have the latest version of pip installed. You can do this by running the following command:
  • cssCopy code

    py -m pip install --upgrade pip
    
  • Check the spelling and case of the package name: Make sure that you are typing the package name correctly, with the correct capitalization.
  • Check for compatibility issues: Some packages may not be compatible with certain versions of Python or operating systems. Check the package documentation to see if there are any compatibility issues.
  • Try installing from a different source: Sometimes, packages may be available from sources other than PyPI. Check the package documentation to see if there are any alternative installation instructions.
  • As for your specific issue, it seems that the package SpeechRecognition is not available on PyPI, which is why you are getting the error message “no matching distribution found.” However, you can try installing the package from the source code on GitHub. Here’s how you can do it:

  • Clone the GitHub repository to your local machine using the following command:
  • bashCopy code

    git clone https://github.com/Uberi/speech_recognition.git
    
  • Navigate to the cloned repository directory using the following command:
  • bashCopy code

    cd speech_recognition
    
  • Install the package using the following command:
  • Copy code

    py -m pip install .
    

    This should install the SpeechRecognition package on your system.

    I hope this helps! Let me know if you have any further questions or issues.

    Best regards,
    Agata
    Pylogix : https://pylogix.com/
    GitHub: https://github.com/PYLOGiX-DEV/pylogix