Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forgot virtualenv name - how to find the name of the virtual env?

Tags:

virtualenv

I set up a flask site with uwsgi/nginx a while back, and set up a virtualenv.. I've forgotten the name of the venv I set up, and I can't find any way to list the virtualenv in a current dir.

How do I find out the name of my virtualenv?

like image 423
AndyB Avatar asked Jun 23 '14 04:06

AndyB


People also ask

How do I find my virtualenv name?

The name of the current virtual environment will now appear on the left of the prompt (e.g. (venv)Your-Computer:project_folder UserName$ ) to let you know that it's active. From now on, any package that you install using pip will be placed in the venv folder, isolated from the global Python installation.

How do I find the virtual environment path?

If you want to verify that you're using the right pip and the right virtual environment, type pip -V and check that the path it displays points to a subdirectory of your virtual environment. Note that when you want to upgrade pip in a virtual environment, it's best to use the command python -m pip install -U pip .

How can I see virtual environment in CMD?

Type cd env in the prompt then source bin/activate . When activated, the terminal will display (env) at the start of each line in the CLI. The last command you need to know when using a virtual environment is deactivate . When deactivated, the command prompt will no longer display (env) before each line.

How do I list all virtual environments?

To see a list of the Python virtual environments that you have created, you can use the 'conda env list' command. This command will give you the names as well as the filesystem paths for the location of your virtual environments.


1 Answers

If it’s definitely in the current directory, try ls */bin/python. Otherwise, ls **/python, or find . -name python. You can, of course, just make a new one, too.

like image 149
Ry- Avatar answered Sep 24 '22 23:09

Ry-