天天看點

python pip install 遇到問題及解決辦法彙總

1、pip3 install cv2
           
C:\Users\user>pip3 install cv2
Collecting cv2
  Could not find a version that satisfies the requirement cv2 (from versions: )
No matching distribution found for cv2
You are using pip version 18.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
           
解決辦法:
    pip3 install opencv-python
           

 修改Python的pip源至國内鏡像方法:

在pip檔案夾下建立一個 pip.ini.txt文本,内容是:

[global]
 index-url = https://pypi.tuna.tsinghua.edu.cn/simple