pypa / pypa/packaging.python.org

Create a discussion document about virtual environments

Open
#1,344 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: discussions
Dominant language
Python
Stars
1.7k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
4

Description

Before you can start installing or using packages in your virtual environment you’ll need to activate it.

While a virtual environment is activated, pip will install packages into that specific environment.

Activating a virtual environment will put the virtual environment-specific python and pip executables into your
shell's PATH.

Could these parts be updated as well? They are incorrect and actively misleading, leading to a lot of misunderstandings. A virtual environment can be used without activation. It depends on how / which pip is used. It would be fantastic if this guide could explain that in slightly more detail: Explicitly explain that activating is only (one way of) putting the the virtual environment-specific python and pip executables into the current shell's PATH. Specifying that path explicitly is also possible and often easier, preferred, clearer, more robust. The leaky abstraction "activation" and the lack of such an explanation is mystifying things unnecessarily, and leads to many problems and much confusion.

Originally posted by @petsuter in https://github.com/pypa/packaging.python.org/issues/1338#issuecomment-1793544750

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the guide passages quoted in the issue and read the linked discussions for context on activation and explicit interpreter paths. Done means the documentation explains that activation is optional, describes its PATH effect, and shows that an environment can be used by explicitly selecting its python or pip executable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.