(spider) C:\Users\DELL\Desktop\spider\clinical\us>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple rediscluster Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting rediscluster Using cached https://pypi.tuna.tsinghua.edu.cn/packages/0a/2c/0f2ab19a4f20ea7bd2dbb4032fc332894feabdb0346353fbd9cbdb0c152d/rediscluster-0.5.3.tar.gz (9.9 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [10 lines of output] Traceback (most recent call last): File "<string>", line 36, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "C:\Users\DELL\AppData\Local\Temp\pip-install-3swmgrko\rediscluster_f63525f58c7841bcaef32cedbba1d14f\setup.py", line 2, in <module> from rediscluster import __version__ File "C:\Users\DELL\AppData\Local\Temp\pip-install-3swmgrko\rediscluster_f63525f58c7841bcaef32cedbba1d14f\rediscluster\__init__.py", line 12, in <module> from rediscluster.cluster_client import StrictRedisCluster File "C:\Users\DELL\AppData\Local\Temp\pip-install-3swmgrko\rediscluster_f63525f58c7841bcaef32cedbba1d14f\rediscluster\cluster_client.py", line 5, in <module> from redis._compat import ( ModuleNotFoundError: No module named 'redis._compat' [end of output]
时间: 2023-12-01 18:04:17 浏览: 104
根据您提供的错误信息,看起来是缺少了`redis._compat`模块。这可能是由于`redis`库版本不兼容导致的问题。
为解决此问题,您可以尝试先卸载已安装的`redis`库,然后重新安装一个较低版本的`redis`库,例如2.10.6版本。您可以通过以下命令来完成:
```shell
pip uninstall redis
pip install redis==2.10.6
```
安装完成后,再次尝试安装`rediscluster`:
```shell
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple rediscluster
```
这样应该能够成功安装 `rediscluster`。如果问题仍然存在,请提供完整的错误信息,以便我能够更好地帮助您解决问题。
相关问题
(spider) C:\Users\DELL\Desktop\spider\clinical\us>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple rediscluster Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting rediscluster Using cached https://pypi.tuna.tsinghua.edu.cn/packages/0a/2c/0f2ab19a4f20ea7bd2dbb4032fc332894feabdb0346353fbd9cbdb0c152d/rediscluster-0.5.3.tar.gz (9.9 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [8 lines of output] Traceback (most recent call last): File "<string>", line 36, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "C:\Users\DELL\AppData\Local\Temp\pip-install-8e401mo_\rediscluster_fa93c49dabad4e31bc2b9a6569cf0ad8\setup.py", line 2, in <module> from rediscluster import __version__ File "C:\Users\DELL\AppData\Local\Temp\pip-install-8e401mo_\rediscluster_fa93c49dabad4e31bc2b9a6569cf0ad8\rediscluster\__init__.py", line 1, in <module> from redis.exceptions import ( ModuleNotFoundError: No module named 'redis' [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.
根据您提供的信息,安装`rediscluster`时遇到了一个错误。根据错误信息,看起来缺少了`redis`模块。`rediscluster`是一个依赖于`redis`模块的库,因此在安装`rediscluster`之前,您需要先安装`redis`模块。
您可以尝试运行以下命令来安装`redis`模块:
```shell
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple redis
```
安装完成后,再次尝试安装`rediscluster`:
```shell
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple rediscluster
```
这样应该能够成功安装 `rediscluster`。如果问题仍然存在,请提供完整的错误信息,以便我能够更好地帮助您解决问题。
Traceback (most recent call last): File "C:/Users/Lenovo/Desktop/毕设/boss直聘数据可视化分析/spider/spiderMain.py", line 217, in <module> spiderObj.main(page=1) File "C:/Users/Lenovo/Desktop/毕设/boss直聘数据可视化分析/spider/spiderMain.py", line 33, in main brower = self.startBrower() File "C:/Users/Lenovo/Desktop/毕设/boss直聘数据可视化分析/spider/spiderMain.py", line 27, in startBrower browser = webdriver.Chrome(service=s, options=option) File "D:\python\install\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 80, in init super().init( File "D:\python\install\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 104, in init super().init( File "D:\python\install\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 286, in init self.start_session(capabilities, browser_profile) File "D:\python\install\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 378, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "D:\python\install\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute self.error_handler.check_response(response) File "D:\python\install\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace)这个错误是什么意思
这个错误是通过 Python 的 Selenium 模块调用 Chrome 浏览器时出现的异常。可能的原因包括:
1. Chrome 浏览器未正确安装或未正确配置
2. Chrome 驱动程序未正确配置或未正确安装
3. Chrome 浏览器版本与 Chrome 驱动程序版本不匹配
4. 其他系统或网络问题导致 Selenium 无法正常与浏览器通信
您可以检查以上问题并尝试解决它们,或者将问题的详细信息反馈给相关人员以获取更好的帮助。
阅读全文