On Thu, Nov 19, 2015 at 7:01 PM, Chris Barker <
chris....@noaa.gov> wrote:
> I'm lost -- didn't this all start because you wanted people to be able to
> install packages without admin privileges???
Yes, and the lack of clarity is my fault. This is one of those things
where a five minute conversation would have laid out the entire
situation. Instead, I've thrown out bits and pieces of the problem.
So, I'll start a new thread, as PYTHONPATH issues are just one piece
of the puzzle.
Here's where we sit today. I happen to work at a trading firm, but I
doubt that changes things much. We have production applications
written in Python, and a number of quants use Python for their model
research. I'm sure other organizations have a similar setup, where
production tools use one subset of the Python ecosystem and
non-production users use an overlapping set of packages. The
environment I work in is mostly Linux (OpenSuSE 12.2, someday to move
to a higher number).
We used to be a Solaris shop, and in the multi-year transition period
to Linux, it was decided that maintenance for Python and a number of
other open source packages (Perl, Emacs, etc) would be outsourced to a
third party company. At that point we had three versions of Python:
* /usr/bin/python (both Linux and Solaris, 2.7.3 by that point on Linux)
* The third-party vendor's supplied Python (2.7.2)
* And on Solaris, a locally built Python 2.4
For the most part, the third-party vendor's Python took over. The IT
folks wrapped all their C++ stuff with Boost::Python so those
libraries were available to production applications. However, all was
not well. Let's ignore Solaris now, as it's all but out the door.
/usr/bin/python and the external Python were (for reasons not clear to
me) built with different internal Unicode representations, making them
binary incompatible. (It was OpenSuSE who departed from the default.)
That meant that if someone needed a package available as part of
OpenSuSE (say, something like scikit-learn), the OpenSuSE version
wouldn't work. We had to build and package it against the external
vendor's Python ourselves for internal distribution. This was
especially problematic for our researchers, as they were the ones who
needed the most packages which were a deviation from what our
production Python apps needed. And the sysadmins failed to understand
the incompatibility between the two versions of Python. They'd install
a package using Zypper, and close the ticket. *sigh*
The quants know about pip as well, so they might find something
interesting, install it using "pip install --user", then go on their
way. If they ran into problems though, and asked for help, they
wouldn't necessarily get any, as the IT folks had no idea what their
environment was. Then there was the IPython notebook problem. A quant
might be using Anaconda or Enthought's distribution, generate a
notebook, then not be able to share it with management, because they
were using the more vanilla (and further out-of-date) packages from
the external vendor.
In the future, with Solaris gone, and us updated to a newer version of
OpenSuSE, this will be less of a problem, but I imagine the quants
will always want something a bit more up-to-date than what the stock
distribution supplies. There may well be other packages which aren't
available from the vendor at all.
Which brings me to Anaconda. Note that if each user installs Anaconda
at different times, the situation I described above still exists, as
IT won't know how Fred's Anaconda install is different from Mary's.
This is how I envision things might improve with a single Anaconda environment:
* Someone like me downloads and installs it. If there are packages
which need installing, then I conda install or pip install them. Then
I wrap the entire ~/miniconda business up into an internal package,
and make it available for installation on all research machines.
* One of the quants wants some new package, X, which isn't available
in the package I built, so he installs it locally using pip install
--user (or something similar using the conda command, if it supports
per user installation). Then he opens a help ticket asking for X in
the Anaconda package.
* I get handed the ticket, install X using conda install, repackage
and release. That evening, the new package is installed on all
research machines automatically.
The time between the second and third steps might be a couple days,
depending how busy I am. Once repackaged though, the quant can
uninstall his version of X, perhaps by discovering that his version of
X is now shadowing the version in the Anaconda package (back to the
tool I proposed). If he encounters problems, he can open a help ticket
which references the Anaconda install, and the IT folks will know just
what he's using. Today, they have no idea.
I hope that helps explain why I'm trying to have my cake and eat it too.
Skip Montanaro