3 ms·
How do you get started with Python dependencies? I've been trying to play with some scientific code and never managed to get it to run and install its dependenc
by AYBABTME 4y ago
How do you get started with Python dependencies? I've been trying to play with some scientific code and never managed to get it to run and install its dependencies.
- mejutoco 4y agoIf you are not using Windows you can use: pip: https://pypi.org/project/pip/ https://pypi.org/project/pip/ pipenv: https://pipenv.pypa.io/en/latest/ https://pipenv.pypa.io/en/latest/ poetry: https://python-poetry.org/ https://python-poetry.org/ Which are basically the same thing.
- simne 4y agoRead about virtualenv, or some of it's analogs. Yes, answer, You run Your scientific projects in chroot environment, with it's own Python and libraries, and connect to outer world via http-json or in some cases with csv files (pipes). To run with pipes, could run third party user space program, which will call different Python envs (fortunately it's easy, just find interpreter inside venv directory tree, and use it directly, instead of just python), and will feed them with data. And yes, sometimes this becomes real pain, because we humans, not machines, and it's easy to make mistake, when working with two so similar envs as typical Python.
- simne 4y agoAlso could share data with db, but I think it is not always good, to add (usually) heavy weight db libraries into venv, but pipes are lightweight, and csv/json/yml also not heavy.