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.

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

  1. Check out any poetry project
  2. $ rm -rf .venv && mkdir .venv
  3. ⚠️ $ poetry install ⚠️
  4. Your dependencies are now installed globally

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
eff917commented, Nov 19, 2019

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.

2reactions
TheButlahcommented, Dec 16, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

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