3 ms·
I don't know what this article is talking about. What is wrong with apt-get install python-something to install the python package called something? Or if it's
by lucb1e 10y ago
I don't know what this article is talking about. What is wrong with apt-get install python-something to install the python package called something? Or if it's not in the repositories, you checkout the library to a subdirectory of your project and call `import something` just like you would when apt-getting it.
So honest question, what's this easy_install stuff? Apt has been around since the nineties, just like python, and didn't change much as far as I know.
- chronial 10y agoapt is not cross-platform.
- lucb1e 10y agoOS X, BSD, Android, Fedora, etc. users will just have to use their respective package managers, or use the second option if there is none (downloading the source to a subdirectory). Python code will not run without a platform-specific interpreter anyway.
- pvg 10y agoThose package managers would then have to know a lot about the specific needs of each language runtime they support. They don't and shouldn't. The alternative - each runtime has its own canonical package manager means you get parallel package systems and duplicated effort which is unfortunate. On the other hand, they actually work unlike, say, 'apt for python packages'.
- mhurron 10y agoapt also installs packages globally to the system and not every python package exists as a deb package.
- dozzie 10y agoAre you from the crowd that thinks that DEB packages only grow on preselected trees and people can't build a DEB themselves for what they need?
- mhurron 10y agoIf I have to build a deb to install something, I might as well just save myself the time and use pip. The convenience of a package manager goes away when you have to package everything yourself before you can use it. At that point saying 'why doesn't everyone just use apt-get' is the same as saying 'why doesn't everyone just configure ; make ; make install.' I also don't use Debian.
- dozzie 10y ago> The convenience of a package manager goes away when you have to package everything yourself before you can use it. Far from it. You get repeatable builds and deployments, much easier and faster setup of development environment (GCC and -devel packages and foreign-language tools pulled in automatically), and you don't make intractable mess on your servers, which allows you to use much wider range of tools than architecturally broken Ansible/Salt. > I also don't use Debian. Irrelevant. Every Linux distribution and most other unix operating systems use some package manager, most of which in turn are more or less equivalent to APT.
- 0xmohit 10y agoThe biggest problem with apt-get is that the available versions of a given software tend to lag from the actual releases by a fair bit. Moreover, you probably don't want to install a certain package using apt-get and another using pip (not all might be available using apt-get). easy_install [0] installs remote packages (similar to CPAN for perl). Obligatory reference: Why use pip over easy_install? [1] [0] https://wiki.python.org/moin/EasyInstall https://wiki.python.org/moin/EasyInstall [1] http://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install http://stackoverflow.com/questions/3220404/why-use-pip-over-...
- pyre 10y agoHow would you then resolve the following scenarios: 1) I need to have two applications running on the same host with different Python versions. E.g. Python 2.6 and Python 2.7. apt would only support one of the Python 2.x line installed at a time. 2) I need to have two applications that have conflicting version requirements on the same host. E.g. neither set of requirements can be installed at the same time. 3) I need to install a newer version of a Python library than the one in apt. If I install it into the system Python via pip, now apt is out of sync with what is actually installed. 4) I need to install a version of a Python library that conflicts with the requirements of system tools that rely on the system-installed Python. If I install said library, then the system tools will stop working / break down. Also "checkout into your project directory and call `import`" doesn't scale. Maybe it works well for toy projects and one-off things, but not so much at scale.
- ex_amazon_sde 10y ago1,2,3,4) You target a specific version of Debian during development and your software will be easily deployable for 5 years without requiring Python-specific knowledge and its dependencies will receive security updates from the distribution.
- dozzie 10y ago> 1) I need to have two applications running on the same host with different Python versions. E.g. Python 2.6 and Python 2.7. apt would only support one of the Python 2.x line installed at a time. I take it you haven't used Debian/APT for last three or four releases, because what you assert (only one Python 2.x version per host) is just plain invalid. > 3) I need to install a newer version of a Python library than the one in apt. If I install it into the system Python via pip, now apt is out of sync with what is actually installed. Uhm... I don't know why you have a problem with building your own package with the newer version. I do it all the time, for software both others' and mine. This leaves points 2) and 4), which are essentially the same: how to install two conflicting versions of the same module for two different applications (one of which may come from the distribution), but this is not a problem with dpkg or RPM, this is a problem with Python's module lookup mechanism. For C libraries there are already good protocols for handling this issue (a little different for RPM and dpkg).
- jfb 10y agoI don't want to depend on upstream for things that may change faster; not everyone uses debian derivatives; system installation means that everything on the box gets the new versions. That's three good reasons not to use the system package manager.