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

What's the current state of the art of managing multiple virtual environments, running tests and running your application?

On Ubuntu and Windows I use Poetry [0], and it works, although it has (had?) some quirks during the installation on Windows. I liked its portability and lockfile format though.

A few years ago I used conda [1], which was nice because it came batteries included especially for Deep Learning stuff. I switched because it felt way to heavy for porting scripts and small applications to constrained devices like a Raspberry Pi.

And then there are also Docker Images, which I use if I want to give an application to somebody that "just works".

What's your method of choice?

[0] https://python-poetry.org/

[1] https://www.anaconda.com/



I use pip-tools to build a requirements.txt file from a requirements.in file. It does basically the same as poetry, but more manually. For me that's good because one of the application has a lot of requirements, and it needs to be deployed on systems with different Python versions, and the requirements need to be packaged along with the application because the servers have very limited internet access. So as long as Poetry doesn't add good support for multiple python versions and/or easy packaging of all dependencies, it isn't worth it for me to do the migration.


I'm liking PDM for a while now. Quicker than Poetry and built according to the Python package spec in mind and not as an afterthought. While it was originally meant to work with PEP 582, it works with virtual environments too (now default).

https://github.com/pdm-project/pdm


If you feel that Anaconda is too heavy, try Miniconda [0]. The base environment is a standard Python 3.9 environment without any additional packages.

[0] https://docs.conda.io/en/latest/miniconda.html


also try mamba which is much faster than conda https://mamba.readthedocs.io/en/latest/index.html


>I switched because it felt way to heavy for porting scripts and small applications to constrained devices like a Raspberry Pi.

Agreed. I like docker images for smallish portable scripts. At home I can develop on my Mac and port it to a Raspberry PI or another x86 Windows/Linux box.

Planning on running a docker swarm with a few Pi’s to see how it works.




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

Search: