If .venv is an empty directory, poetry installs dependencies globally
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: macOS 10.13.5
- Poetry version: 0.11.2
- Link of a Gist with the contents of your pyproject.toml file: N/A
Issue
- Check out any poetry project
$ rm -rf .venv && mkdir .venv
- ⚠️
$ poetry install
⚠️ - Your dependencies are now installed globally
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Configuration | Documentation | Poetry - Python dependency ...
Create the virtualenv inside the project's root directory. If not set explicitly, poetry by default will create virtual environment under {cache-dir}/ ...
Read more >why poetry removes virtualenv? - Stack Overflow
This installs poetry (and it's dependencies including virtualenv ) into into the virtualenvironment created by tox .
Read more >Python Virtual Environments tutorial using Virtualenv and Poetry
A mini-guided Python tutorial showing how to use virtual environment and why it's matters on virtualenv and poetry illustrated examples.
Read more >Managing Dependencies in Python. pip, virtualenv, pipenv ...
The most conventional way to manage dependencies in python has been to install everything globally and then list all dependencies in a ...
Read more >Python Virtual Environments: A Primer
If you install packages to your operating system's global Python, ... still be a valid virtual environment if this directory were empty, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is still an issue in 1.0.0b5
Another use case is creating it with a placeholder file in code repository, that way poetry automatically uses it without having to explicitly set poetry settings.
I’m also running into this issue with poetry
1.0.0
(stable). in my case,.venv
is a docker volume so it has already been mounted and therefore the folder is empty. This means that poetry installs its dependencies globally instead of in the volume. This is annoying because whenever the docker container gets destroyed, i have to reinstall all the dependencies since I cant install them in the volume.