环境:
- python3.9.13
- centos7.9
- 内核版本Linux iZj6c8w6b5qzmugnz72ru0Z 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
背景
- 新拿到的服务器需要安装scrapy-redis
- 这个时候就报错了,具体如下:
Collecting PyDispatcher==2.0.1
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/08/52/2de558a2e7489bf1b2acce6c7ab1800b8bac55dd14e622e26db35f1d65a2/PyDispatcher-2.0.1.tar.gz (21 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the '/usr/local/python3.9/bin/python3.9 -m pip install --upgrade pip' command.
[root@iZj6c8w6b5qzmugnz72ru0Z ~]# pip install PyDispatcher==2.0.0
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
ERROR: Could not find a version that satisfies the requirement PyDispatcher==2.0.0 (from versions: 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5)
ERROR: No matching distribution found for PyDispatcher==2.0.0
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the '/usr/local/python3.9/bin/python3.9 -m pip install --upgrade pip' command.
- 问题主要就出现在这里
PyDispatcher
这个依赖包死活安装不上,搞了半天,真是他么的浪费时间。
- 我怀疑是内核问题,内核版本有点低,我觉得有必要升级下内核
网友评论