[Python] Installing virtualenv globally with Homebrew

Discussão em 'Python' iniciado por Stack, Agosto 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to build someone else's project that relies on the virtualenv package. On Mac OS with Homebrew, the python environment is externally managed, so I can't "globally" install packages with pip, only with homebrew. I've run

    brew install virtualenv

    brew install pyenv-virtualenv

    which seemed to succeed, but python -m virtualenv still gives a "No module named virtualenv" error.

    If it were any other package, I would do the usual thing and create a virtual environment with venv, and install it there. But it feels wrong to install virtualenv inside a virtual environment created by venv. Is there any way to install virtualenv "globally" in some way so the project I'm trying to install can reach it?

    Continue reading...

Compartilhe esta Página