Skip to content
Advertisement

Where to locate virtual environment installed using poetry | Where to find poetry installed virtual environment

I installed poetry using the following command:-
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
To know more about it refer this.

Now I wanted to create a virtual environment, that I created it using the following command:-
poetry config virtualenvs.in-project true
To know more about it refer this.

But after doing this, I can`t see any .venv(virtual environment) folder.

To check if virtual environment is there, we use the following command:-
poetry config virtualenvs.in-project
and if the above command return true, implies you have it.

I’m getting true, also the location mentioned on the docs I cant see it there.

Could anyone tell me how to locate the virtual environment now?

Advertisement

Answer

There are 2 commands I found, that can find where is the virtual environment is located.

  1. Command:- poetry show -v
    The first line of $ poetry show -v will tell you where the virtual environment is located.
    And the rest will tell you what all libs are there in it.

  2. Command:- poetry env info -p
    The above command will give you just the location of virtual environment.

Hope this will solve your purpose.

Thank you.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement