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.

About environment mangement and .venv folder

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

I found that poetry prefer using .venv folder inside as the virtual environment of project. But this behavior is not described in doc. I think it will be good to write down this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
sdispatercommented, Feb 21, 2020

I agree that this is not an intuitive behavior.

I think we should make a distinction between the virtualenvs.in-project setting is not set (and keep the current behavior of using the local .venv virtual environment in this case) and if it’s set explicitly to False.

That way, we make sure that it’s possible to tell Poetry to not use the .venv virtual environment.

2reactions
finswimmercommented, Dec 19, 2019

@etijskens: You have virtualenvs.in-project = true in your config. poetry then creates the venv within the project and calls the folder .venv. The name is hardcoded.

@azdkj532: Ah, I see now. I guess this is a bug. If virtualenvs.in-project = false is set, poetry shouldn’t look for .venv within the project folder.

Reopen this issue.

Thanks for reporting!

fin swimmer

Read more comments on GitHub >

github_iconTop Results From Across the Web

venv — Creation of virtual environments — Python 3.11.1 ...
python3 -m venv /path/to/new/virtual/environment. Running this command creates the target directory (creating any parent directories that don't exist ...
Read more >
Python Virtual Environments: A Primer
This folder is where you'll install external packages that you want to use within your virtual environment. By default, your virtual environment ...
Read more >
Python virtualenv and venv dos and don'ts - InfoWorld
When you set up a virtual environment, the directory it lives in isn't meant to hold anything but the virtual environment itself. Your...
Read more >
Pipenv & Virtual Environments
virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need. It can be...
Read more >
Introduction to Python Virtual Environments and Dependency ...
A virtual environment is an isolated Python environment where a project's dependencies are installed in a different directory from those ...
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