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.

Cannot use multiple environment per project with virtualenvs.in-project=True

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

  • Mojave 10.4.6:

  • Poetry version 1.0.5:

Issue

Hi,

I’m switching from Pipenv to Poetry, and for now, it’s been all for the better!

One aspect of poetry that I like a lot it multiple environments per project As shown in the doc here

The first setting I set in Poetry was virtualenvs.in-project which create a .venv in the project root.

Now let’s say I want to be able to run tests on both python 2 and python 3, one cannot just switch the environment but the environment gets overwritten.

Is there a way to use both features at the same time? If so how?

Thanks a lot

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
melMasscommented, May 12, 2020

Hello @finswimmer,

Thanks for the confirmation, is there a reason for this? Can’t we create a .venv2.7.15 & .venv3.7.xx and use poetry use to switch between them?

The general idea is that I don’t write anything to the system disk (well as little as possible). I don’t like the concept of having a general place for all envs but if there is no plan for any of this I will find a way using custom path and your --local trick for the projects that use multiple python!

0reactions
melMasscommented, May 14, 2020

Thanks for the support! Yes I realized the names weren’t random but linked to the project which is fine also.

Coming from pipenv poetry has been a bless!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry: How to keep using the old virtual environment ...
One option is to enable the virtualenvs.in-project option, e.g. by running poetry config virtualenvs.in-project true.
Read more >
venv — Creation of virtual environments
A virtual environment is created on top of an existing Python installation, known as the virtual environment's “base” Python, and may optionally be...
Read more >
Configuration | Documentation
If not set explicitly, poetry by default will create virtual environment under {cache-dir}/virtualenvs or use the {project-dir}/.venv directory when one is ...
Read more >
Configuring Python Workspace: Poetry
The command poetry config virtualenvs.in-project true tells poetry to create virtual environment directory ( .venv ) inside a project ...
Read more >
Poetry Advance
Poetry provides an environment on a global system path rather than a folder holding your dependency libraries (like virtualenv does), therefore segregating the ......
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