Home >Operation and Maintenance >Linux Operation and Maintenance >How to solve the connection timeout when using pip to install SpeechRecognition under Linux

How to solve the connection timeout when using pip to install SpeechRecognition under Linux

王林
王林forward
2023-05-24 16:19:171159browse

Use pip to install SpeechRecognition under Linux

You will often see statements like import speechrecognition as sr in the code. To check the relevant information, you need to use pip to install SpeechRecognition. . First install pip under Linux, and then install it through the command pip install SpeechRecognition. There will always be a large section of red text (roughly meaning network timeout when connecting to a third-party library). The content of the red text is roughly as follows:

How to solve the connection timeout when using pip to install SpeechRecognition under Linux

I checked a lot of information online, and some said it was a change. Just change the capitalization of the letters and then restore them to the previous ones. I tested it and it didn’t work! ! !
After searching for a long time, I finally found the solution! ! ! !
Solution:
pip specifies the installation source for installation: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple SpeechRecognition
Effective in actual testing:

How to solve the connection timeout when using pip to install SpeechRecognition under Linux

The above is the detailed content of How to solve the connection timeout when using pip to install SpeechRecognition under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete