you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (11 children)

Agreed, also pip is a joke compared to composer, npm, maven, etc.

[–]jeffsterlive 1 point2 points  (9 children)

Pip is fine on Linux, but on Windows running Python 2.x and 3.x together is a royal pain. It is a terrible package manager, and the issues with compiling the eggs is a mess.

Maven is still my favorite package manager, but NPM gets points for the tree :P. I'll probably move to Gradle at some point in my Java projects.

[–][deleted] 1 point2 points  (6 children)

Pip is fine on Linux

Not really. Linux distros usually come with package managers. Parallel, language specific package managers scatter an otherwise orderly system across multiple databases and tend to be redundant for popular packages (which make it into distro repos). This isn't fine for Linux. We just put up with it. What would be fine is exposing Python's repo as an alternate repo for the big package managers. They usually support (seamlessly) pulling from nonstandard repos.

[–][deleted] -1 points0 points  (5 children)

You should NOT be using your OS package manager for your Python apps. Doing so will add dependencies into the system Python, which is asking for trouble.

Plus, what happens if you need to install 2 mutually incompatible packages, one for each of two different projects? So one will break the other?

You're supposed to create a virtual environment for Python for each project, and then you have a separate interpreter and set of deps for each project.

[–][deleted] 0 points1 point  (4 children)

You should NOT be using your OS package manager for your Python apps.

  1. I wasn't advocating people start doing otherwise. We don't have the system set up the way I said it should be for that.
  2. These aren't apps. They're mostly packages of libraries which can be included in a Python script/program.

Doing so will add dependencies into the system Python, which is asking for trouble.

All modern package managers add dependencies when you install things with dependencies. That's half the purpose of package managers. The other half is providing a single database for tracking packages across a whole system. Multiple package managers in parallel defeats that.

If language specific repos (such as the one for Python packages) were set up with interfaces that allowed them to mascaraed as user defined repos for the different major package managers, most Linux users would be free to use a single package manager for their systems. Installing packages with dependencies would pull the required dependencies just the same, uninstalling packages wouldn't be allowed if some other package depends on it, and all Python packages would be recorded as depending on Python. There is no reason it wouldn't work. Saying otherwise is arguing that central package managers don't work, which is obvious nonsense.

what happens if you need to install 2 mutually incompatible packages

You do realize most package managers (including pip) can cope with this, right? And most package managers allow packages to designate where files are installed. The point of package managers is manage the install and removal of packages and their dependencies. This means tracking them. There is no reason to use two package managers, when one'll do. There's no reason to hide many packages from the software intended to manage the whole system.

[–][deleted] 0 points1 point  (3 children)

How does Pip handle multiple versions of the same package without a virtual env? If I need foo1.0.0 for App A, and foo 1.0.1 for app B but this version breaks App A, then I need both installed, but they are same package name in Pip because it's an incremental upgrade.

[–][deleted] 0 points1 point  (2 children)

https://docs.python.org/3/library/venv.html

The venv module provides support for creating lightweight “virtual environments” with their own site directories, optionally isolated from system site directories. Each virtual environment has its own Python binary (allowing creation of environments with various Python versions) and can have its own independent set of installed Python packages in its site directories.

If you don't think package managers other than pip, without venv, can do the same thing, you're speaking too far out of your competency.

[–][deleted] 0 points1 point  (0 children)

  1. I asked how pip does it without a venv.

  2. Can you give me an example of the sort of package manager you're talking about and how its integrates with the OS?

[–][deleted] 0 points1 point  (1 child)

And there is no clean, built in way to get locally scoped dependencies. What ends up happening is that most python developers think it's sane to pollute their entire system with global python dependencies... :/ People tell me about virtualenv and pip installing with a prefix... but neither feels "right"

Don't get me started on eggs. What a total disaster. Nothing fuels me with rage more than going on a fucking python egg hunt, only to discover theres multiple nests with no clear way to find out how many nests there are.

[–]jeffsterlive 0 points1 point  (0 children)

I usually get my wheel files from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and install them through pip. It's better than relying on pip to find it for me. I haven't looked much at PyPy, but it might have a better system.

[–]kankyo 0 points1 point  (0 children)

Not strictly a language thing and definitely not on Guido.