3 ms·
As someone who doesn't often use Python what is the current "best" solution for installing and managing your environment? Last time I used Python on macOS and
by satysin 6y ago
As someone who doesn't often use Python what is the current "best" solution for installing and managing your environment?
Last time I used Python on macOS and Windows I manually installed the official version from python.org and used pip and virtualenv. It wasn't too bad but it seems things have changed in the last 6 years or so? Or is this still the most flexible way to go?
I would be grateful for any guidance.
- qbasic_forever 6y agoFor totally greenfield python projects check out poetry, it is an opinionated python project workflow that's very close to the nodejs/npm ecosystem's package.json. It does a virtualenv behind the scenes, pins your python dependencies with a lock file, and even has niceties like dev scripts as first class citizens. Otherwise if you're trying to use some python project with particular dependencies pyenv is a good way to get a specific python version. But if the project has a lot of native dependencies (think scientific computing with lots of fortran, C++, etc. code to compile) then you're almost certainly better off with conda as a higher-level entire binary system manager.
- justinmayer 6y agoI use asdf and its Python plugin [1] to install Python interpreter versions. For managing virtual environments on my preferred shell (Fish), I use (and maintain) VirtualFish [2]. For managing project dependencies, I activate environments via VirtualFish and then use Poetry [3] to update the dependencies within the environments. [1]: https://github.com/danhper/asdf-python https://github.com/danhper/asdf-python [2]: http://github.com/justinmayer/virtualfish http://github.com/justinmayer/virtualfish [3]: http://python-poetry.org http://python-poetry.org