On Fri, Jun 08, 2018 at 09:21:23PM +0200, didier gaumet wrote: > Le 08/06/2018 à 20:51, Markos a écrit : > > Hi, > > > > I'm starting my studies with Python 3 on Debian 9. > > > > I have to install the matplotlib module, but I'm in doubt what is the > > difference to install with the command: > > > > pip3 install matplotlib > > > > or > > > > apt-get install python3-matplotlib > > > > Is there any difference in the packages that are installed? > > > > Thanks, > > > > Markos > > > > I suppose that this comparable to install a Firefox extension via > apt-get or from Firefox: apt-get will provide an older version > system-wide while pip3 will provide a more up-to-date version only in a > user environment? > Do not take my word for it, though: I have absolutely no competence in > Python. >
Using pip is like building non-python software from source when it is already packaged for Debian -- possible, and occasionally necessary in some circumstances, but to be avoided where you can. If you use the Debian packaging system, Debian knows what you have installed and what libraries your system is dependent on, etc, and won't do anything to break your system for example when you upgrade. But if you install using pip Debian doesn't know anything about it (so won't upgrade it for you when you upgrade). In particular, but not limited to, upgrading a system that has a mix of manually-built and Debian-installed packages can be a pain. I can tell you from experience the version of matplotlib in Debian 9, while not the latest and greatest, is plenty good enough. I use it quite a lot. If this is you making a foray into data science with python, by the way, I also strongly recommend the pandas library (also in Debian, and again the version in Stretch is not latest but plenty new enough). Mark