Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pyenv combined with Poetry is still the cleanest way to run multiples envs. Any other suggestions?


The maintainers of the Python packaging have just officially adopted Hatch:

https://hatch.pypa.io/

Hatch aims to do what Poetry does, but is strictly compliant with Python standards.


> The maintainers of the Python packaging

Who?

> have just officially adopted Hatch:

Do you have a link?


The Python Packaging Authority, the team that maintain setuptools etc. for core Python.

There's a discussion here:

https://discuss.python.org/t/hatch-1-0-0-is-available/15359


Oh great thanks for the link :)


I had a lot of fun with https://pdm.fming.dev/


Nice, never heard but almost seems like a 1:1 competitor?


I use pyenv + direnv. If my project uses 3.10.3 I just add `layout pyenv 3.10.3` to my .envrc file. This creates a venv in the `.direnv` subdirectory. When I `cd` into the dir my environment is automatically configured to use the virtual environment and when I `cd` out the configuration is removed.

If you want to use poetry + direnv, that's also an option.

https://github.com/direnv/direnv/wiki/Python#pyenv https://github.com/direnv/direnv/wiki/Python#poetry


I've always found pyenv a bit complex to deal with. I've also encountered some bugs with a fresh debian install and pyenv. To put this in perspective, i'm not the sharpest knife in the drawer (not a programmer, not an adminsys).

I prefered alt install for a specific version (python3.3, python 3.X, etc. with associated pip) and virtualenv. Then doing `python3.X -m venv` i got what i need. VScode or pycharm can bind to it.

Recently i've tryed Fedora and they ship python versions compiled so you just need to use the package manager. It's easier and it deals with updates. I stick with that now (i'm migrating from deb to fedora for my servers).


I like and use poetry, it generally just works.

It is however slow as molasses and its error messages are sometimes worse than a stack trace.


miniconda is nice for that too, especially if you want non-python things like cuda.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: