pip install 提示'since package 'wheel' is not installed'

pip 是 Python 的包管理工具,全称是 “Pip Installs Packages”,用于安装和管理 Python 的第三方库和依赖项。它是 Python 开发中非常重要的工具之一。

env

  • rockylinux9.5
  • python3.9.x

问题

pip install -r requirement.txt
...
102.8 Collecting pycparser
102.8   Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl (117 kB)
102.8 Using legacy 'setup.py install' for Flask-APScheduler, since package 'wheel' is not installed.  ### 提示wheel包未安装(pip安装形式)
102.8 Using legacy 'setup.py install' for oss2, since package 'wheel' is not installed.
102.8 Using legacy 'setup.py install' for aliyun-python-sdk-core, since package 'wheel' is not installed.
102.8 Using legacy 'setup.py install' for crcmod, since package 'wheel' is not installed.
102.8 Building wheels for collected packages: mysqlclient
102.8   Building wheel for mysqlclient (pyproject.toml): started
103.1   Building wheel for mysqlclient (pyproject.toml): finished with status 'error'
103.1   ERROR: Command errored out with exit status 1:
...

解决

pip install wheel

⚠️:关注错误下面几行错误信息