Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support .venv #213

Closed
kakulukia opened this issue Jun 14, 2018 · 15 comments
Closed

Please support .venv #213

kakulukia opened this issue Jun 14, 2018 · 15 comments

Comments

@kakulukia
Copy link

Please support a local .venv directory or link containing the virtualenv.
This way some tools like PyCharm just recognise the .venv and use it.

And for a manual link creation it would help to print out the full path rather than
"Creating virtualenv django-secrets-py3.6 in /Users/andy/Library/Caches/pypoetry/virtualenvs"
This sadly cant be used for copy and paste.

@sdispater
Copy link
Member

A .venv directory is already supported by poetry.

If you already have one it will be used automatically. If you want all your virtualenvs to be created in the local .venv you have to set the appropriate setting:

poetry config settings.virtualenvs.in-project true

@kakulukia
Copy link
Author

could you please document that and all other missing settings?

@kakulukia
Copy link
Author

ill leave that ticket open as a reminder

@chingc
Copy link
Contributor

chingc commented Jun 17, 2018

It would be really nice if poetry config --list would list all options and defaults, not just the one that was changed.

@kakulukia
Copy link
Author

yes, good point - maybe the changed valued on top or if there are many options, maybe another --list-all switch

@Imaclean74
Copy link
Contributor

or 'poetry config' - with no arguments could list the current config block ? Maybe with a help message describing how to set overrides.

@cauebs
Copy link
Contributor

cauebs commented Jun 23, 2018

@kakulukia I've documented the available settings on #232. I'd appreciate if you could take a look at it :)

@Imaclean74
Copy link
Contributor

looks great ! still - its always nice when tools can be self-documenting. And 'poetry config' should output something - a link to those docs, or a usage message - or something.

@cauebs
Copy link
Contributor

cauebs commented Jun 23, 2018

@Imaclean74 I agree 100%. I'm going to leave that decision to @sdispater, though.

@cauebs
Copy link
Contributor

cauebs commented Jul 4, 2018

@Imaclean74 In version 0.11, poetry config --list outputs all values, even if unset.

@kakulukia
Copy link
Author

nice!

@mcarifio
Copy link

mcarifio commented Feb 18, 2019

I didn't see a summary in the documentation, so this is my understanding of what I've gleaned above. If I've set poetry config settings.virtualenvs.in-project true, then poetry install will create a project .venv directory and populate it with the correct python version based on pyproject.toml (?). If the project has a .venv directory in the project, then it will be respected regardless of settings.virtualenvs.in-project. poetry shell will use .venv and $VIRTUAL_ENV will be the path to that directory. There doesn't seem to be a convention about what the directory should be named, so I'll follow whatever default you have coded up. Please advise. Thanks.

@chingc
Copy link
Contributor

chingc commented Feb 18, 2019

@mcarifio There is no convention to what the virtual env directory is named, but the most common are env, .env, venv, and .venv. The last one is probably the most popular and is the one poetry checks. I'm not sure if it looks for the other names, but it's simple enough to check by creating a new empty project with a virtual env in it.

@mcarifio
Copy link

@chingc ty

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants