Blender python ensurepip problems/errors

sj flag

Trying to install a addon in Blender throws a python error.

import ensurepip
ModuleNotFoundError: No module names `ensurepip`

So then I tried

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
    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.

Feeling a theme developing here, I then tried

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.

Because I already knew I had installed pip a long while back.

And I am stuck because I don't know what to do now. I do not use python for anything so have no idea what the real error is here, all I can do is trust python and follow the instructions it gave me, which got me to here.

I've seen some stuff about using venv for projects but as I understand venv, which is to say that I don't understand venv, it sets up a virtual environment to run python for a project with it's own private environment, but I'm not running a project I'm running Blender or am I expected to setup a venv then run Blender from the cli within that venv?

Like I said, I don't use python for anything so I have no clue what to do now, and frankly if the answer is to run Blender from cli then I have to say that leaves a sour taste in my mouth.

Kubuntu 23.04 Python 3.11.2 Blender 3.4.1

System is up to date.

I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.