News for hackers. Stuff that matters.
Re:My Python Development Environment, 2020 Edition by Evidlo on Monday November 11, 2019 @08:51PM (#21510812)
For those new or unfamiliar with python, I think the best solution is the simplest: pip and virtualenv
Re:My Python Development Environment, 2020 Edition by ramraj07 on Monday November 11, 2019 @09:29PM (#21510999)
Seriously. The author is bending over backwards to accommodate poetry from every direction, from the stupidest installation instructions I've heard, to "can't transfer from requirements.txt" to "it doesn't work well with docker but doable". Like what exactly does it add that's worth all this complexity? Make you a maitai every hour?
[dead]
Re:My Python Development Environment, 2020 Edition by yjftsjthsd-h on Monday November 11, 2019 @10:49PM (#21511353)
https://news.ycombinator.com/newsguidelines.html

> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."

Re:My Python Development Environment, 2020 Edition by Twirrim on Monday November 11, 2019 @10:17PM (#21511246)
I did, certainly don't see what specific value poetry is providing from what he said.
Re:My Python Development Environment, 2020 Edition by raihansaputra on Wednesday November 13, 2019 @01:36AM (#21521641)
AFAIK, pipenv and poetry also pins down the dependencies requirements to the same versions, while pip don't (?).
Re:My Python Development Environment, 2020 Edition by ph2082 on Monday November 11, 2019 @10:17PM (#21511247)
Small python projects I did, I used venv and pip. Learned my lesson through wasting couple of hours after fighting through dependency issues.

Being from JAVA Shop for long time, If I have to switch between different version of JAVA, all I do is change JAVA_HOME to point to correct version, go to base project directory and "mvn clean install" does the job. :).

Re:My Python Development Environment, 2020 Edition by Grue3 on Tuesday November 12, 2019 @04:37AM (#21512805)
I would actually recommend conda, it solves the "multiple version" issue and is compatible with virtualenv/pip so you can keep using them as usual.
Re:My Python Development Environment, 2020 Edition by ScoutOrgo on Tuesday November 12, 2019 @09:50AM (#21514508)
Miniconda makes this really simple and their doc on environments is easy to read/understand. The benefits of conda really shine when trying to install a package with external dependencies to an environment.

The one thing I thought was neat here was pipx. I do have a few CLIs set up in my default conda env and haven't run into any dependency problems yet, but have occasionally tried to use them while another env is activated. Having a separate env automatically created for the entry points is a nice value add.

Re:My Python Development Environment, 2020 Edition by globular-toast on Tuesday November 12, 2019 @07:57AM (#21513657)
Yes, definitely. But other tools can be used in addition to solve their own problems.

Need to have multiple versions of python installed and easily accessible? Use pyenv.

Need to run tests across multiple versions of python? Use tox.

Need to freeze environments for deployment purposes? Use pip-tools.

Need to freeze the entire operating system? Use docker or vagrant.

Don't use tools you don't need. That would be silly.

Re:My Python Development Environment, 2020 Edition by thesuperbigfrog on Monday November 11, 2019 @09:48PM (#21511104)
pip and virtualenv are my preferred solution too because they are simple and easy to use.

However, you can run into issues if you are using different versions of Python, or Python on different operating systems.

Re:My Python Development Environment, 2020 Edition by ropans808 on Monday November 11, 2019 @10:05PM (#21511205)
That's my general solution as well, but when pip fails at dependency resolution tools like poetry become really nice.
Re:My Python Development Environment, 2020 Edition by j88439h84 on Tuesday November 12, 2019 @03:45AM (#21512585)
Nah, Poetry does the work of both and more.
Re:My Python Development Environment, 2020 Edition by aequitas on Tuesday November 12, 2019 @05:58AM (#21513165)
I would add pip-tools to that so the requirements update process can be automated.