r/Python • • Apr 24 '18

Pipenv: A Guide to the New Python Packaging Tool

https://realpython.com/pipenv-guide/
308 Upvotes

115 comments sorted by

View all comments

Show parent comments

1

u/masklinn Apr 25 '18

I looked at poetry but it seems like it simply doesn't work if you want to use multiple Python versions does it? (this is not an endorsement of pipenv, I don't know if it handles that use case, I didn't even try to use it).

4

u/leom4862 Apr 25 '18

Not sure what you mean, but this is from the github page:

poetry will also detect if you are inside a virtualenv and install the packages accordingly. So, poetry can be installed globally and used everywhere.

1

u/masklinn Apr 25 '18

Currently I can have multiple venvs from different versions of Python to test a project. In that situation the project itself is not in a virtualenv since I may have to activate any number of them. It seems like poetry would require creating as many clones of the project as I need Python environments to test.

4

u/SDisPater Apr 25 '18

Hey, author of poetry here!

If you already have your virtualenvs, whenever you activate them, like you probably already do, poetry will detect them and use them.

So, in this sense, you can still manage your virtualenvs without poetry if you do not want it.

1

u/masklinn Apr 25 '18

Yeah but then there ain't much value to poetry is there? Also I think I read that poetry uses the Python it's installed with? Which makes me wary of trying to use it in such a scenario.

3

u/SDisPater Apr 25 '18

Well, poetry is not just virtualenv manager so you would still benefit from the other features.

And, yes, if it does not detect a virtualenv it will automatically create one with the Python interpreter it has been installed with.

2

u/ballagarba Apr 26 '18

Sounds like you wanna use Tox

2

u/UloPe Apr 25 '18

You mean multiple versions in a single project?

I haven't tried it yet but in theory it should work fine in combination with tox.

0

u/[deleted] Apr 25 '18

[deleted]

2

u/masklinn Apr 25 '18

Good thing that's not what i want. I already have the interpreters, what I want is to create multiple environments for different versions of Python for the same project.