The Python installation package reports an error ERROR: Could not find a version that satisfies the requirement XXX solution

When we use pip to install python packages, the following errors often occur:

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


After searching for a long time, I finally found a way to solve this error.

Directly selecting the pip source and trusting its source can solve this problem.

pip install 库包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

The Douban source is used above, and it is applicable to replace it with Tsinghua source, Ali source, etc.

Tsinghua source:

Simple Index

Guess you like

Origin blog.csdn.net/ramblerviper/article/details/125648990