6 ms·
Imagine I’m just getting started with Python, and I see this article. I think to myself, “Awesome, a primer!” Then I start reading (these comments)... mayyybe
by patagonia 8y ago
Imagine I’m just getting started with Python, and I see this article. I think to myself, “Awesome, a primer!”
Then I start reading (these comments)... mayyybe I should try Julia... or anything else, at least while I’m still getting started.
- vxNsr 8y agoKinda exactly what went through my mind, I've dabbled in python, but only to use other ppl's projects, which sometimes required setting up pip, etc. So I was looking forward to reading about how it'd been simplified :(
- zitterbewegung 8y agoThis isn’t a primer but more like a survey of packaging options. Using pip and virtualenv is usually fine or using pipenv .
- patagonia 8y ago“Usually” is great until it’s not. I don’t want to get invested in a languages only to discover issues down the line. So, if something as basic as packaging is potentially problematic and there are other options available, I might look elsewhere before rolling the dice that this problem is not too problematic. Perhaps “Primer” was the wrong word, but I believe the sentiment is valid. Reading the comments, there is simply no consensus. If code readablility is important since code will be read more than written, packing is important because in many many scenarios that count code will be distributed more than it will be read. It is simply frustrating that the typical response to comments like my original comment is some form of “it’s not as bad as you think”. Look, we have a problem here. A problem many other languages deem important enough to solve upfront. It’s been a problem for a long long time.
- aprdm 8y agopip and virtualenv has been solving the problem and is the standard for ever. other people tried different approaches, like, pipenv and is just that, a separate project trying to solve the same problem. I don't know why / who said that pipenv is the official recommended way, if it is it should not be and I hope it is not.
- xapata 8y agoThe Python community is not monolithic. PyPA has made some decisions that others might disagree with.
- craftsman 8y ago> I don't know why / who said that pipenv is the official recommended way, if it is it should not be and I hope it is not. The Python Packaging Authority says that pipenv is the first "recommended way" for managing application dependencies: https://packaging.python.org/guides/tool-recommendations/#application-dependency-management https://packaging.python.org/guides/tool-recommendations/#ap... Except if pipenv doesn't meet your needs. Then use pip. Or, if you need cross-platform support, use buildout. Or, if you are doing scientific computation, don't use any of those, use conda, Hashdist, or Spack. Or if you need to create a package, use setuptools and twine. So, no, pip and virtualenv don't solve the problem, because there are a lot of different problems and use-cases. I can say from my experience that conda is _the_ best solution to the problem for scientific work.
- jefurii 8y agoJust use pip and virtualenv. I've been using them on a cluster of related projects for years and they've been rock-solid.
- mixmastamyk 8y agoAnd you can avoid virtualenvs as well until you need to ship a large app. "pip install --user pkg" is good enough for beginners and writing libraries with few deps.
- Serow225 8y agoDoes anyone know why the Python community has seemed to struggle with package mgmt fragmentation/churn so much over the years, compared to other languages? Did Guido just not really care about package mgmt?
- paulie_a 8y agoNo it is dead simple. Requirements separated by environment and a virtualenv. It's awesome compared to JavaScript
- crad 8y agoProblem is like that XKCD comic about standards. People keep reinventing the wheel instead of embracing and evolving the one thing that works well and has existed for a long time.
- xapata 8y agoGuido wrote Python in 1990. Did you use a package manager back then? I didn't. Part of the issue is how well Python integrates with non-Python dependencies. Before conda, when I wanted to upgrade some Python projects, I'd get errors complaining about my Fortran compiler. These days, most of the major projects upload precompiled binaries for major platforms to PyPI, but when it was just source code...
- Serow225 8y agoSure, but couldn't it have been given some BFDL/high-level leadership importance in the last five years to rein in the craziness?
- jonafato 8y agoThe PyPA team has done a lot over the past five years. The changelog for pip (https://pip.pypa.io/en/stable/news/ https://pip.pypa.io/en/stable/news/) contains quite a bit, PyPI was migrated to Warehouse, and there have been several PEPs focused on improving the packaging situation. A lot of these ideas come from various people in the community and get formalized as official recommendations or tools, but these things take time, especially accounting for backward compatibility in an ecosystem as large and mature as Python's. The short answer to "why isn't this solved?" is "it's hard, and there's a lot to do". Development practices change over time, and the tooling continues to evolve with them. It's easy to see a broad survey like this and think that there's too much going on, but taken at a high level, the space is definitely trending in the right direction. (Note: I'm not part of the PyPA, but I'm interested in this area and try to follow along from the outside.)
- xapata 8y agohttps://www.anaconda.com/download/ https://www.anaconda.com/download/
- zmmmmm 8y agoWait until someone from the python community recites to you "there should be one and only one good way to do something" ....!
- jonafato 8y agoI think plenty of people in the Python community will earnestly say that while acknowledging that there isn't universal agreement on what that one good way is. It's an ideal to strive for, not a statement of fact.