3 ms·
It's a system-wide tool, there's nothing wrong with installing it with sudo pip install if you want it on your PATH.
by hcarvalhoalves 13y ago
It's a system-wide tool, there's nothing wrong with installing it with sudo pip install if you want it on your PATH.
- hdevalence 13y agoYes, there is: system packages should by installed with the system's package manager. Otherwise, you have two systems managing the same set of files, causing tears and suffering. Packages not installed with the system's package manager should be installed elsewhere, e.g., a local install in a user's home directory, or (in the worst case) /usr/local or /opt.
- hcarvalhoalves 13y agoYou're assuming everybody follows the package manager religion. E.g., it would be fine doing this in OS X, and pip install will follow the best UNIXy practice.
- lucian1900 13y agopip installs in /usr/local, actually. It's not quite as bad as it looks.
- hdevalence 13y agoThanks for the correction.
- deleted 13y ago[deleted]
- paultag 13y agoI wrote about why this was a bad idea at: http://notes.pault.ag/debian-python/ http://notes.pault.ag/debian-python/ If you want a clear failure mode - if this installs requests globally, think about the chaos if you're on Debian stable, with 0.12.1, before the API break - after a pip install, you may end up with all the software on your system broken. When this happens, please don't file bugs with Debian. Thanks.
- hcarvalhoalves 13y ago> When this happens, please don't file bugs with Debian. Thanks. We are all adults here. I believe the implications of using pip instead of apt on Debian are pretty clear for anyone using it. This is not an universal problem though.
- paultag 13y agoNo. It's not. If you saw the people filing the bugs, you wouldn't say this.
- deleted 13y ago[deleted]
- drdaeman 13y agoUnless you intend to (eventually) break your OS, system-wide packages should be installed with system-wide package managers. That is, dpkg/apt, rpm/yum, pacman, emerge or similar. Failure to comply with this rule bites hard when you install some other package that uses Python and pulls dependency from OS repository that you had already installed from PyPI. That obviously fails due to files being already present (and probably from another egg's version) and you're probably already using this egg somewhere so you probably can't readily replace it. Manual clean-up of such mess isn't pretty nor fun. So, if you want a non-project-bound package (like ipython), do so with `pip install --user`. Otherwise, virtualenv is the tool. (Obviously, there are non-trivial exceptional cases where sudo pip is fine. I believe they're quite rare.)