首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python写的是3.10.8版本,但是安装时出错时说我有3.11.2版本

Python写的是3.10.8版本,但是安装时出错时说我有3.11.2版本
EN

Unix & Linux用户
提问于 2023-03-09 00:41:32
回答 1查看 701关注 0票数 0

因此,我试图从OpenAI安装3.11.2,并且说我有版本的D0,所以它不能安装只需要>=3.7,<3.11版本的D1版本,但我发誓,当我检查我的D1版本时,它说我有我需要的版本,如下所示:

代码语言:javascript
复制
$ python --version                                      
Python 3.10.8

顺便说一句,在我有3.11.2版本之前,我用这个职位的帮助对它进行了修改,也许执行这个帖子中的命令没有帮助。我是个彻头彻尾的乞丐,所以也许有一个简单的解决办法,我不知道。另外,我使用的是kali linux。下面是我的错误:

代码语言:javascript
复制
pip install git+https://github.com/openai/whisper.git 
    Defaulting to user installation because normal site-packages is not writeable
    Collecting git+https://github.com/openai/whisper.git
      Cloning https://github.com/openai/whisper.git to /tmp/pip-req-build-n6ajw2le
      Running command git clone --filter=blob:none --quiet https://github.com/openai/whisper.git /tmp/pip-req-build-n6ajw2le
      Resolved https://github.com/openai/whisper.git to commit ad3250a846fe7553a25064a2dc593e492dadf040
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting triton==2.0.0
      Using cached triton-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (63.3 MB)
    Collecting numba
      Using cached numba-0.56.4.tar.gz (2.4 MB)
      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 "", line 2, in 
            File "", line 34, in 
            File "/tmp/pip-install-bvqf8ryy/numba_26a7eac980d84443948e159a452af5d2/setup.py", line 51, in 
              _guard_py_ver()
            File "/tmp/pip-install-bvqf8ryy/numba_26a7eac980d84443948e159a452af5d2/setup.py", line 48, in _guard_py_ver
              raise RuntimeError(msg.format(cur_py, min_py, max_py))
          RuntimeError: Cannot install on Python version 3.11.2; only versions >=3.7,<3.11 are supported.
          [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.
EN

回答 1

Unix & Linux用户

发布于 2023-03-09 01:49:04

update-alternatives的问题是其他版本还在安装,您正在使用的程序不一定要使用您希望它们使用的版本。尝试用apt purge删除不需要的包。

此外,查看~/.local/bin~/.local/lib,以删除pip遗留下来的与Python相关的垃圾。如果您没有在这些文件夹中安装其他任何内容,它们应该是安全的删除。警告:~/.local/share确实包含您希望保留的文件。如果你想把它清理干净,你必须手动检查它。

pip~/.cache/pip中缓存下载,这样您就可以重新安装包,而不必重新下载其中的大多数。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/739127

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档