Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python3.11-venv package to Ubuntu instructions #16533

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

JPablomr
Copy link

@JPablomr JPablomr commented Oct 5, 2024

Description

This updates the install instructions for Ubuntu24 to include the python3.11-venv package.

I couldn't get the install to work until I installed this package, I was seeing

Error: Command '['/opt/automatic1111/stable-diffusion-webui/venv/bin/python3.11', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

and then it would error out with:

ERROR: Cannot activate python venv, aborting...

Screenshots/videos:

Before:

###############################################################
+ cd /opt/automatic1111/stable-diffusion-webui/..//stable-diffusion-webui/
+ [[ ! -d venv ]]
+ python3.11 -m venv venv
Error: Command '['/opt/automatic1111/stable-diffusion-webui/venv/bin/python3.11', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
+ venv/bin/python -m pip install --upgrade pip
/opt/automatic1111/stable-diffusion-webui/venv/bin/python: No module named pip
+ first_launch=1
+ [[ -f venv/bin/activate ]]
+ printf '\n%s\n' '################################################################'

################################################################
+ printf '\e[1m\e[31mERROR: Cannot activate python venv, aborting...\e[0m'
ERROR: Cannot activate python venv, aborting...+ printf '\n%s\n' '################################################################'

After:

+ cd /opt/automatic1111/stable-diffusion-webui/..//stable-diffusion-webui/
+ [[ ! -d venv ]]
+ python3.11 -m venv venv
+ venv/bin/python -m pip install --upgrade pip
Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (24.0)
Collecting pip
  Using cached pip-24.2-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.2-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-24.2
+ first_launch=1
+ [[ -f venv/bin/activate ]]
+ source venv/bin/activate

Checklist:

I couldn't get the install to work until I installed this package, I was seeing 
```
Error: Command '['/opt/automatic1111/stable-diffusion-webui/venv/bin/python3.11', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
```
@jmraker
Copy link

jmraker commented Oct 16, 2024

It didn't work for me. Until I asked chatGPT for help.

The instructions for "ubuntu 24.04" is wrong.
sudo apt install python3.11
needs to be
sudo apt install python3.11-full
as the full version contains the "ensurepip" module

Uninstall python 3.11 and install the "full" version from deadsnakes

@viking1304
Copy link
Contributor

viking1304 commented Oct 23, 2024

It didn't work for me. Until I asked chatGPT for help.

The instructions for "ubuntu 24.04" is wrong. sudo apt install python3.11 needs to be sudo apt install python3.11-full as the full version contains the "ensurepip" module

Uninstall python 3.11 and install the "full" version from deadsnakes

EDIT:

Note to self: "do not answer things when you are busy and do not have time to properly think" 🙊

@jmraker do not forget that ChatGPT is not always reliable. ensurepip should be supported by both versions, since it is part of standard library. ensurepip was not the issue, but venv most likely is not included in "standard" version for Ubuntu, since they have python*-venv, so basically both of you are right.

You can use one or the other way. I will double check when I find some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants