Will installing another version of Python affect Mantid on Windows

From Ron Smith:

Some software (GSAS-2) I’d like to install on my office PC requires Python for its operation, but is quite specific about what distributions/versions of Python it requires: namely Version 2.x - they’re currently using 2.7.6 - but NOT version 3.x. Continuum Anaconda or Enthought Canopy are the distributions the installation notes recommend.

A bit more information is here: InstallWindows – GSAS-II - Crystallography Data Analysis Software

My question is - do you have any idea if this is likely to conflict with the Python that comes with Mantid?

Thanks for any guidance you can give me.

Ron Smith.

Ron,

Since about a year ago Mantid started bundling its own version (currently 2.7.3) of python within our own installers on windows. This was to avoid an problems that may occur with other installations of Python on the same machine.

So there is very unlikely that another version of python would affect a Mantid installation. The only slight risk is that if you start python from the command line the one you will start will depend on the order of things in the windows PATH environment variable.

If you are in any doubt which python you have started this will tell you.

import sys
print sys.executable

If you use Mantid solely through Mantidplot then this will always link to the correct Python installation.

Regards,
Nick Draper

This seems to be the best place for a follow up. I’d like to run some Python scripts (currently stand alone, maybe in future within Mantid algorithms) which need packages newer than those in Mantid. For example “uproot” to read the ROOT files from musrSim needs numpy > 1.13.1 and mantid 3.13 (Windows) comes with numpy 1.9.3.

Do I need to install another Python alongside Mantid, or can I use something like “virtualenv” to allow installation of alternate versions?

I’ve found by trial and error that “pip install uproot” breaks Mantid…

The temporary solution seems to be to install an earlier version of “uproot” (2.9.11) that doesn’t have the dependency on a shiny new numpy. (It’s an indirect dependency as uproot >=3.0 now imports “awkward”, to provide some new features I don’t need at present, and that in turn has the new numpy as its dependency)

Hi James,

Thanks for posting your solution here. I can only really speak for OSX, but I run a different version of Python outside MantidPlot to that which I build MantidPlot with. Personally, I find virtual environments the best way to keep different Python environments well separated.

Keith