Python 安装MODEL报错WARNING version xx is available

Posted Adorable_Rocy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python 安装MODEL报错WARNING version xx is available相关的知识,希望对你有一定的参考价值。

Q1:在安装模块的时候发现系统报错如下:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\\\Users\\\\Dell\\\\AppData\\\\Local\\\\Temp\\\\pip-req-tracker-_nyodpl_\\\\e497bd74205deb88b286d3556502f61a4d67dd2b0bf63d8a57f23ee7'

WARNING: You are using pip version 20.2.3; however, version 22.0.3 is available.
You should consider upgrading via the 'c:\\users\\dell\\pycharmprojects\\untitled1\\venv\\scripts\\python.exe -m pip install --upgrade pip' command.

意思是pip版本太低了,上面很明显的说明了需要安装更高的版本,解决方式如下:

C:\\Users\\Dell>python -m pip install --upgrade pip
Collecting pip
  Downloading pip-22.0.3-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 12 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-22.0.3


Q2:看似安装成功了,但是在添加MODEL的时候依旧报错

C:\\Users\\Dell\\PycharmProjects\\untitled2\\venv\\Scripts>python -m pip install pandas
Collecting pandas
  Using cached pandas-1.4.1-cp38-cp38-win_amd64.whl (10.6 MB)
Collecting pytz>=2020.1
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting python-dateutil>=2.8.1
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ---------------------------------------- 247.7/247.7 KB 45.8 kB/s eta 0:00:00
Collecting numpy>=1.18.5
  Downloading numpy-1.22.2-cp38-cp38-win_amd64.whl (14.7 MB)
     ---------------------- ----------------- 8.4/14.7 MB 6.2 kB/s eta 0:17:06

ERROR: Exception:
Traceback (most recent call last):
  File "C:\\Users\\Dell\\PycharmProjects\\untitled2\\venv\\lib\\site-packages\\pip\\_vendor\\urllib3\\response.py", line 438, in _error_catcher
    yield
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\\Users\\Dell\\PycharmProjects\\untitled2\\venv\\lib\\site-packages\\pip\\_internal\\cli\\base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
......
  File "C:\\Users\\Dell\\PycharmProjects\\untitled2\\venv\\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.

一大堆的红色失败字体引入眼帘,我们只好暴力重装了

C:\\Users\\Dell\\PycharmProjects\\untitled2\\venv\\Scripts>python -m pip install -U --force-reinstall pip

Collecting pip
  Using cached pip-22.0.3-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.3
    Uninstalling pip-22.0.3:
      Successfully uninstalled pip-22.0.3
Successfully installed pip-22.0.3

C:\\Users\\Dell\\PycharmProjects\\untitled2\\venv\\Scripts>pip install pandas

Collecting pandas
  Using cached pandas-1.4.1-cp38-cp38-win_amd64.whl (10.6 MB)
Collecting numpy>=1.18.5
  Downloading numpy-1.22.2-cp38-cp38-win_amd64.whl (14.7 MB)
     ---------------------------------------- 14.7/14.7 MB 29.8 kB/s eta 0:00:00
Collecting python-dateutil>=2.8.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz>=2020.1
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting six>=1.5
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pytz, six, numpy, python-dateutil, pandas
Successfully installed numpy-1.22.2 pandas-1.4.1 python-dateutil-2.8.2 pytz-2021.3 six-1.16.0

重新装一遍之后,Successfully installed pandas

以上是关于Python 安装MODEL报错WARNING version xx is available的主要内容,如果未能解决你的问题,请参考以下文章

Python 忽略warning警告错误 + 跳过报错继续执行程序

Vue脚手架报错:‘v-model‘ directives require no argument 解决方案

ubuntu 10.04 安装软件装不上,报错

于在Python3.6.7 +Ubuntu16.04下安装channels报错

php 编译安装插件提示PHP Warning: PHP Startup: Unable to load dynamic library 报错

快速解决NPM报错:peerDependencies WARNING