question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

easy way to find virtualenv path

See original GitHub issue

It would be helpful if there was a simple command to determine the path to the current virtualenv. I can easily enough run poetry run which python, but that may not be the first idea. This is helpful for both running commands without prefixing them with poetry run every time, and also helpful for IDEs like PyCharm that want to know where the virtualenv lives.

Something like poetry virtualenv.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:33
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

53reactions
jacebrowningcommented, May 18, 2018

FYI: The first line of $ poetry show -v will tell you where the virtual environment is located.

Many other commands seem to do the same with -v/--verbose.

47reactions
finswimmercommented, Mar 28, 2021

@sebdiem: I guess poetry env info -p is what you are looking for.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get virtualenv's bin folder path from script - Stack Overflow
One option is using sys.executable , get the folder (which seems to be the bin folder of the virtualenv) and that's it... but...
Read more >
Python Virtual Environments: A Primer
You can find the base Python installation that your virtual environment is based on by navigating to the path you can find under...
Read more >
Can someone please explain how to find the path ... - Treehouse
Some people manually manage their "Env" directories by placing them all in a directory under their home directory. When you're ready, checkout ...
Read more >
Pipenv & Virtual Environments
This tutorial walks you through installing and using Python packages. It will show you how to install and use the necessary tools and...
Read more >
venv — Creation of virtual environments — Python 3.11.1 ...
How venvs work¶ · bin on POSIX; · Scripts on Windows). This will prepend that directory to your · PATH , so that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found