5 ms·
We had many issues with pipenv and migrated all our projects to Poetry, which I would recommend over pipenv for solving this problem.
by bananaoomarang 6y ago
We had many issues with pipenv and migrated all our projects to Poetry, which I would recommend over pipenv for solving this problem.
- jitl 6y agoI like that pipenv also handles virtualenv creation, but I too moved my projects to Poetry after all of the various Pipenv-maintainer fiascos
- kylebarron 6y agoPoetry also creates virtualenvs for you I believe
- jklehm 6y agoYes it does
- mumblemumble 6y agoBy default, poetry automatically creates virtualenvs for you. Though you can override that behavior in your local or global poetry config.
- jitl 6y agoOops. What I meant is, Pipenv manages python versions for you. You tell it what version of python your project uses, and pipenv will make sure to create the venv using that version of python. Great! Solves managing python versions. With Poetry, the venv is created with whatever version of python that Poetry was installed with. So if you (like me) follow the setup guide on macOS, Poetry will always create python 2.7 virtualenvs until you uninstall it and re-install it under python 3.X. Annoying.
- mumblemumble 6y agoIt will only use whatever version is currently activated if that's compatible with the python version requirement specified in pyproject.toml. If it isn't, then it will look for an installed python that is, and create the virtualenv using that instead. I'm not sure I completely love that behavior; it would be nice if it would default toward trying to use the minimum supported version, even if the currently active one is compatible. But I guess that wouldn't do anything that tox couldn't do better. You can also explicitly tell it what version to use for a project with a command like `poetry env 3.8`.