Gentoo Archives: gentoo-alt

From: Konstantin Tokarev <annulen@××××××.ru>
To: "gentoo-alt@l.g.o" <gentoo-alt@l.g.o>
Subject: Re: [gentoo-alt] idea: use portage to build a scientific Python installation
Date: Mon, 23 Dec 2013 12:41:17
Message-Id: 191387802472@web24m.yandex.ru
In Reply to: [gentoo-alt] idea: use portage to build a scientific Python installation by Martin Luessi
1 22.12.2013, 00:28, "Martin Luessi" <mluessi@×××××.com>:
2 > Hi all,
3 >
4 > I recently had the idea that it might be possible to use portage to
5 > build a scientific Python installation and wanted to float the idea by
6 > you to see what you think.
7 >
8 > First, let me explain the reason for why anyone would want to do so.
9 > For work, I use Python extensively for scientific computing. However,
10 > I do not have administrator rights on my workstation and the
11 > distribution we use (CentOS) does not have the latest Python packages
12 > that are needed for scientific computing. In addition, even if CentOS
13 > had the packages, it wouldn't be feasible to constantly ask the
14 > sysadmins to install/update packages. One solution is to use a
15 > scientific Python distribution from a commercial vendor, e.g., Canopy
16 > from Enthought or Anaconda from Continuum Analytics. While these
17 > distributions work quite well, they are expensive for non-academic
18 > users and they are not very flexible, i.e., it can be difficult to
19 > install packages that are not in the package repository provided by
20 > the vendor, especially if the packages need additional dependencies. I
21 > also have a gentoo-prefix setup on my workstation. However, the whole
22 > prefix directory is very large as it makes minimal assumptions about
23 > the libraries provided by the host system. The size is a problem when
24 > using it over NFS e.g. on a cluster. Also, I have found that it is
25 > difficult to get X11 applications working as the gentoo-prefix will
26 > install its own X server etc.
27 >
28 > This made me wonder whether portage could be used to build a
29 > scientific Python installation. My idea is instead of making very
30 > minimal assumptions about the libraries provided by the host system
31 > (as done in a normal prefix install), one could generate a world file
32 > listing all the libraries provided by the host system and freeze their
33 > versions using package-mask. Like that, programs and libraries in the
34 > prefix would link to libraries on the host system whenever possible,
35 > which would make the prefix smaller. By having a gentoo based
36 > scientific Python installation, one could take advantage of all the
37 > packages provided by gentoo-science and it would make it easy to
38 > install Python packages that depend on non-Python libraries.
39 > What do you guys think, is this feasible?
40
41 If you are strongly focused on Python-related software, I think the easiest
42 route for you is to install required version of Python from sources into
43 your $HOME and install all other things using pip (which won't require root).
44 There is no need to buy commercial Python distribution, and it's certainly
45 less work than to maintain whole Prefix. Also, I guess portage does not
46 have ebuilds for all packages present in PyPI, so you'll probably need to use
47 pip anyway (or make ebuilds yourself).
48
49 BTW, CentOS has lots of 3rd party repositories, allowing you to have almost
50 any combination of software versions you want (of course that would require
51 asking your administrator, but may be a convenient way to install software
52 which would be useful not only for you).
53
54 --
55 Regards,
56 Konstantin