user3668129
user3668129

Reputation: 4820

Cannot see the name of the current virtual environment in terminal

  1. What is the name of this current virtual environment ?
  2. How can I get the repository which this virtual environment uses to install packages (via pip) ?

Upvotes: 2

Views: 1152

Answers (1)

TheEagle
TheEagle

Reputation: 5982

When I open a new terminal, the name of virtual environment is not shown.

The name cannot be shown, because in order to see the name you must first activate the virtual environment. You have to

  1. create a virtual env in a folder
  2. cd into that folder
  3. run sh bin/activate

Then, the name will be shown.
Without an active virtual environment, pip will install the packages into

  • /usr/lib/python3 when run with admin rights (e.g. using sudo)
  • $HOME/.local/lib/python3 when run without admin rights

And the repository the packages will be downloaded from should normally be pypi.org.

Upvotes: 1

Related Questions