pip命令报错
1.pip命令运行报错
cmd终端报错:
2.解决方法
①查看环境变量有没有Python
②复制第一个路径,查看环境变量有没有
3.pip报错
WARNING: You are using pip version 21.2.3; however, version 23.0.1 is available.
You should consider upgrading via the 'C:\Users\75081\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.
4.执行命令
pip install --upgrade pip
5.报错"pip不是最新命令"
6.解决方法
python -m pip install -U pip
安装成功
Flask安装报错
1.安装
pip install Flask
2.报错
File "C:\Users\75081\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\urllib3\response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
ReadTimeoutError:安装python-opencv出现问题
3.解决
原因:Wifi或网络发包频率国小,等待时间过长,下载错误
第一种方式
pip install --index-url https://pypi.douban.com/simple opencv-python
第二种方式
pip --default-timeout=100 install -U pip
pip install opencv-python
安装成功