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 poetry is installed into a virtualenv, it's installing my project into it too

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.14

  • Poetry version: 0.12.3

Issue

I have installed poetry into a virtualenv, and poetry is using that virtualenv to install my project, despite it not being active. I would expect poetry to make a new virtualenv for this project.

$ python3 -m venv penv
$ penv/bin/pip install poetry
$ penv/bin/poetry install

Note that my project was installed into penv despite it not being activated. It looks like (possibly) https://github.com/sdispater/poetry/commit/fa4c116213557579b1596f2ff0148f7865759ac6 broke things. poetry debug:info displays the virtualenv as the penv that poetry is installed into but my shell has no VIRTUAL_ENV var set.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

6reactions
roee-allegrocommented, Sep 25, 2019

I am experiencing this issue with 0.12.17. The way to reproduce is slightly different than @mmerickel 's:

python3 -m venv penv
. penv/bin/activate
pip install poetry
poetry install
# pip freeze output contains the project's requirements
0reactions
mmerickelcommented, Oct 22, 2018

thanks @sdispater !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing environments | Documentation - Poetry
Poetry makes project environment isolation one of its core features. What this means is that it will always work isolated from your global...
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 >
Python Poetry: Package and venv Management Made Easy
Learn how to install and use the Python Poetry package manager to manage the dependencies and virtual environment(s) of your Python project.
Read more >
Dependency Management With Python Poetry
A dependency manager like Python Poetry helps you specify, install, and resolve external packages in your projects.
Read more >
why poetry removes virtualenv? - Stack Overflow
The poetry command will detect it is inside a virtualenv and then install the dependencies into that virtualenv, but also cleaning up ...
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