pypa / pypa/packaging.python.org

More accurate guidance: what is the meaning of "you're in your virtual environment" ?

Open
#741 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi,

As a newbie, I would like to read more accurate descriptions.
e.g.
"Installing packages
Now that you're in your virtual environment you can install packages. Let's install the Requests library from the :term:Python Package Index (PyPI):
"

  • Does this mean that
    a) the command shell's current directory needs to be set to the virtual environment's directory (if yes: exactly which directory?)
    or
    b) the meaning is that kind of I've been logged in to this virtual environment (and doesn't matter where the current directory is, even it can be changed to any other virtual environment's directory) and the commands are served/ran by the bins in the activated virtual environment?

n.b. 'logged in' is quite an abstract phrase here - meaning something like locked, bound, activated - still learning the phrases :-)
---edit---
I found this
https://docs.python.org/3/library/venv.html#module-venv
"You don’t specifically need to activate an environment; activation just prepends the virtual environment’s binary directory to your path, so that “python” invokes the virtual environment’s Python interpreter and you can run installed scripts without having to use their full path. However, all scripts installed in a virtual environment should be runnable without activating it, and run with the virtual environment’s Python automatically.
"

  • So, an activated virtual environment is not something like logged in, as far as I understand actually it's something very weak, it's a temporal change of PATH (until deactivate is run)

Also, a description (diagram, maybe) of the process/flow of activating-using-deactivating virtual environments would shed light here, e.g. what is changed under the hood, what variables are affected, how a command and its path is interpreted. Maybe that belongs to another topic.

Thanks!

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

Start with the “Installing packages” passage quoted in the issue and compare its wording with Python’s venv documentation at the linked URL. Clarify what activation changes, how the current directory relates to the environment, and whether a diagram belongs in this topic; done means a newcomer can understand the activation, use, and deactivation flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 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.