You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I encountered the error error: externally-managed-environment while trying to install pytest following the "Get Started" guide. #15242
I opened the pytest guide at https://docs.pytest.org/en/stable/getting-started.html and attempted the installation.
When I ran the command pip install -U pytest, I received the following error: error: externally-managed-environment.
As a beginner, I wouldn't know the next steps to successfully install the library. Furthermore, the error message suggests using the --break-system-packages flag, an action that could potentially break the operating system's Python installation and any tools that depend on it.
Your documentation page at https://docs.pytest.org/en/stable/explanation/goodpractices.html states: "For development, we recommend you use venv for virtual environments and pip for installing your application and any dependencies, as well as the pytest package itself." I would suggest adding a note next to the installation command explaining that it is recommended to perform the installation within a virtual environment, along with a link to an explanatory page.
Would you be open to a small PR that adds this?
My environment details:
Ubuntu 24.04.2 LTS (WSL)
Python 3.12.3 (system Python)
pip 24.0
Activity