Blender python Ensurepip 问题/错误

Blender python Ensurepip 问题/错误

尝试在 Blender 中安装插件会引发 Python 错误。

import ensurepip
ModuleNotFoundError: No module names `ensurepip`

所以我尝试了

python3 -m ensurepip
/usr/bin/python3: No module named ensurepip
python3 -m pip install --upgrade pip
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

感觉到这里正在发展的主题,然后我尝试

sudo apt install python3-pip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (23.0.1+dfsg-1).
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

因为我早就知道我安装了 pip。

我被困住了,因为我不知道现在该做什么。我没有用 Python 做任何事情,所以不知道这里真正的错误是什么,我所能做的就是相信 Python 并按照它给我的说明操作,这让我到了这里。

我见过一些关于使用 venv 进行项目的内容,但据我了解 venv,也就是说我不了解 venv,它设置了一个虚拟环境来为具有自己私有环境的项目运行 python,但我没有运行正在运行 Blender 的项目,或者我是否应该设置 venv,然后从该 venv 中的 cli 运行 Blender?

就像我说的,我没有用 Python 做任何事情,所以我不知道现在该做什么,坦率地说,如果答案是从 cli 运行 Blender,那么我不得不说这让我很不舒服。

Kubuntu 23.04 Python 3.11.2 Blender 3.4.1

系统已更新。

相关内容