I don’t want to be too negative, and I realize this isn’t an option for everyone ... but seriously, just use conda if you can. Judging from comments here and in the past, we all know packaging is one of Python’s Achilles’ heels. I spent a couple years bouncing around with pyenv/pipenv, then poetry, then back. I lovingly followed all the flamewars here and on github. Ultimately, I realize now, I laboured under the con…
I've had the opposite experience. I used conda for several years, primarily for data science, but regularly ran into problems with packages not working, updates for packages bring severely delayed, and issues with conda itself. Switched to pyenv+virtualenv 18 months ago and haven't had a single issue. I believe both of our stories. I just always wonder how this happens that two people have such opposite experiences.
What the Heck Is Pyproject.toml?
111–120 of 199 posts
Re: What the Heck Is Pyproject.toml?
#112Earlier quoted context omitted.
Ruby serves one ecosystem (web), barely. Python serves several huge ones: web, datascience, 3d graphics, sysadmin... all with different needs, different conventions, different “standard” tools to do this and that. The community is orders of magnitude bigger than ruby by now, and anything that requires coordination is much harder to accomplish than in a lot of other ecosystems. Python is now on par with ecosystems lik…
> Python serves several huge ones: web, datascience, 3d graphics, sysadmin... all with different needs, different conventions, different “standard” tools to do this and that. Them having different conventions and standard tools is the failure, not a constraint. What are the different needs that these ecosystems have which mean they couldn't use a common package manager? I don't believe there are any.
There's probably no logical reason why a single common package manager for these domains is impossible. But they have different priorities, and people write tools that solve their own problems. Who is going to decide which package managers are unnecessary, and convince all of the users who are happy with them to switch to something else?
Re: What the Heck Is Pyproject.toml?
#113Poetry seems the go-to tool for dependencies management and it centralizes all your package configurations alongside its dependencies in pyproject.toml.
[1] https://medium.com/georgian-impact-blog/python-tooling-makes...
Re: What the Heck Is Pyproject.toml?
#114Earlier quoted context omitted.
I am an experienced Python programmer. I often have to collaborate with people who are not. There is no greater hell than talking them through installing a working Python environment. It’s impossible. Meanwhile, the pip project is full of developers who tell you that your problem is not a problem and you’re discouraging people by pointing out that they’re blame shifting: https://github.com/pypa/pip/issues/4995 I hone…
> There is no greater hell than talking them through installing a working Python environment. It’s impossible. I give a lot of Python professional trainings, and I get to do that regularly, in very diverse situations. It's indeed full of gotchas. Since it's not going to be solved quickly, meanwhile, here is what works if you need to help people setuping python: 1 - Install Python correctly The first version Python do…
My company settled on pipenv, and we regret it. It's slow and buggy and has crazy behaviour. It's not bad enough that it's worth updating all projects (or rather, there's no good enough alternative) but I regret about once a week having advocated for it.
Note: I think you made a mistake, you say that you can rename or move a venv but then you say you can't.
Re: What the Heck Is Pyproject.toml?
#115Earlier quoted context omitted.
I am an experienced Python programmer. I often have to collaborate with people who are not. There is no greater hell than talking them through installing a working Python environment. It’s impossible. Meanwhile, the pip project is full of developers who tell you that your problem is not a problem and you’re discouraging people by pointing out that they’re blame shifting: https://github.com/pypa/pip/issues/4995 I hone…
As a comment to your first paragraph, I've found pyenv combined with its virtualenv plugin to be a decently consistent experience.
Re: What the Heck Is Pyproject.toml?
#116Earlier quoted context omitted.
How do other people replicate your venv? How does production replicate your venv?
You pin all your direct dependencies in requirements.txt, run "pip freeze >requirements-frozen.txt" to get a list of the versions of all dependencies (direct and transitive), and then you ship that. Replicating is just "virtualenv --python=python3 venv && . ./venv/bin/activate && pip install -r requirements-frozen.txt". Am I missing something here? Yes, to be absolutely sure, you need to have the same versions of pyt…
What?! Seriously? That is not how it's supposed to work. Requirements.txt is already meant to be the frozen dependencies (like the output of pip freeze). Why change that? I much prefer how pip-tools does it with a new file, requirements.in that contains the unpinned direct dependencies. I thought poetry did the same thing but with pyproject.toml?
Re: What the Heck Is Pyproject.toml?
#117Earlier quoted context omitted.
I am an experienced Python programmer. I often have to collaborate with people who are not. There is no greater hell than talking them through installing a working Python environment. It’s impossible. Meanwhile, the pip project is full of developers who tell you that your problem is not a problem and you’re discouraging people by pointing out that they’re blame shifting: https://github.com/pypa/pip/issues/4995 I hone…
> There is no greater hell than talking them through installing a working Python environment. It’s impossible. I give a lot of Python professional trainings, and I get to do that regularly, in very diverse situations. It's indeed full of gotchas. Since it's not going to be solved quickly, meanwhile, here is what works if you need to help people setuping python: 1 - Install Python correctly The first version Python do…
Re: What the Heck Is Pyproject.toml?
#118Earlier quoted context omitted.
How do other people replicate your venv? How does production replicate your venv?
You pin all your direct dependencies in requirements.txt, run "pip freeze >requirements-frozen.txt" to get a list of the versions of all dependencies (direct and transitive), and then you ship that. Replicating is just "virtualenv --python=python3 venv && . ./venv/bin/activate && pip install -r requirements-frozen.txt". Am I missing something here? Yes, to be absolutely sure, you need to have the same versions of pyt…
Re: What the Heck Is Pyproject.toml?
#119Earlier quoted context omitted.
You pin all your direct dependencies in requirements.txt, run "pip freeze >requirements-frozen.txt" to get a list of the versions of all dependencies (direct and transitive), and then you ship that. Replicating is just "virtualenv --python=python3 venv && . ./venv/bin/activate && pip install -r requirements-frozen.txt". Am I missing something here? Yes, to be absolutely sure, you need to have the same versions of pyt…
This is worse than how it’s done on most modern languages.
Modern languages do pretty much the same, just have a nicer wrapper for it.
Re: What the Heck Is Pyproject.toml?
#120Earlier quoted context omitted.
This is BS. most other languages, with the same constraints, have done far better. Take Ruby as one example.
Yes, Python’s packaging is partly bad because it’s based on C extensions, which are intrinsically bad, but it’s also just plain bad compared to its peers, like Ruby and NPM.