top | item 19989300

(no title)

bow_ | 6 years ago

Why do you think it is the worst? If you don't consider Python, what would you then think is the worst?

Genuinely curious. I use Python daily and I rarely encounter problems with it. There is some getting used to in the beginning, but I went through a similar phase when I started using npm and cargo as well.

What I can say is that I had to go through a lot of experimentation myself to arrive at the tools I use now (pyenv + Poetry). And if anything, maybe the lack of one way that is adopted by everyone in the community is the problem.

discuss

order

dagw|6 years ago

What I can say is that I had to go through a lot of experimentation myself to arrive at the tools I use now

That is, I think, the big problem. Just using pip has never really worked so people have built tools on top of pip, in parallel with pip and replacements for pip. Basically there is no one way to do things.

sametmax|6 years ago

npm, yarn, bower, jamjs, pnpm...

Besides, I have 15 years of Python behind me, I code and train in Python for a living, and I still use just pip.

pip and venv are packaged with recent versions of Python and do the job fine.

bmn__|6 years ago

Tests are not automatically run and centrally reported as part of the installation process.

There is no good heuristic for picking one package over the other when they occupy a similar problem space. This is mostly a cultural problem, the community's efforts are lackluster.

virtualenv is not installed by default, making bootstrapping into a separate prefix that is independent from the system installation unnecessarily aggravating.

Semiautomatic packaging tools (e.g. pypi into rpm) produce low kwalitee packages and manual intervention more often needed compared to similar languages.

Worse are languages that simply don't have much manpower behind them in absolute numbers, e.g. CL/quicklisp. Given Python's mindshare, the results are subpar.

ptx|6 years ago

> virtualenv is not installed by default

It is, but it's called venv these days:

  python3 -m venv my_venv
(Unless you're sticking to a very old version of Python, but in that case there's nothing the Python developers could do about it.)

TomBombadildoze|6 years ago

> Tests are not automatically run and centrally reported as part of the installation process.

I _hate_ this working on Java/Maven projects. Why do I need to run all the tests in order to install dependencies? The tests should have been run at _packaging_ time. I'm installing binary dependencies, why should I not trust that they have been tested?

These are fundamentally separate concerns. If you're worried about the robustness of your dependencies, review them first.

> There is no good heuristic for picking one package over the other when they occupy a similar problem space. This is mostly a cultural problem, the community's efforts are lackluster.

Stars on Github? Issues opened vs closed? Stack Overflow? The community is active in all sorts of places and it's not that hard to get a feel for the prevailing best tool for a given job. It just takes a little effort. The community's responsibility is to maintain those parts which they have created, not give you recommendations.

> virtualenv is not installed by default

python -m venv

> Semiautomatic packaging tools (e.g. pypi into rpm)

If you want to package your application and its dependencies as an OS package, that's fine. Do it as a single unit and isolate it from the rest of the system. We have venv (or pyenv if you need a different version of Python) to solve this.

I've experienced every headache there is with Python packaging. It's been bad, it is now better but still rather quirky, but it does require some domain knowledge. If you know how to use it, you will rarely experience serious problems.

pfranz|6 years ago

I generally avoid pip, but have to use it once in awhile. I don't like that pip installs globally by default. I've messed up too many OSes because of a library I only needed for 5minutes. I always use --user, but I don't think that obliquitous (I don't tend to use venv, either).

I was trying to upgrade a package. I first looked for a "pip upgrade/update <package>"--doesn't exist. I then tried "pip install <package>" to see if it would offer to upgrade--it didn't. I think found "pip install --upgrade <package>".

I'm sure I'd learn these things if I did them all the time, but it's some slightly poor defaults (so slightly bad and impactful I can't imagine them being changed), and some discoverability and friction I don't see in package managers I use way less often.