Why Can't I Create a Python Virtual Environment on Mac OS Tahoe 26.1?

November 21, 2025 4 answers
Asked by !Seat near the aisle
I'm using Mac OS Tahoe 26.1 on my MacBook Pro M1, and ever since the update, I've been unable to create a Python virtual environment. When I run `python3.13 -m venv my_env` as a regular user, I encounter this error: `Error: Command '['/my_env/bin/python3.13', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1`. I've tried searching for a solution but haven't found anything useful. As a temporary workaround, I have to use sudo to create the virtual environment and then change the folder ownership back to my regular user. I'm curious why a non-admin user can't create a venv in their own directory, but this workaround works for now, even if it's a bit clunky.

Answers

!median 37
How did you install Python? If you used Homebrew, it should work fine on Tahoe. Just wondering if the installation might be the issue.

!Seat near the aisle: Yeah, I installed it via Homebrew too. Maybe I messed up something in the configuration.

Reply to this answer
fable draft 12
You might want to try not using sudo and see if you can clean up any old venvs. It seems like you might be trying to create a venv from within another one, which can cause issues.
Reply to this answer
shelf life
First, make sure your pip is updated by running `pip install --upgrade pip`. You shouldn't need to use sudo to create virtual environments at all. Just try running `python3 -m venv nameofproject` again and let us know the outcome.
Reply to this answer
Upland
I was dealing with some venv issues too, and it seems like my environment changed recently after an update. You're definitely not alone in this!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions