Since PyTransport is standard Python, it should run fine on Windows. At the moment it won't install, but the only obstructions seem to be with compiling and installing the Python packages for each inflationary model. The key obstructions are:
distutils can't find the Visual C++ compiler. This is a showstopper. It appears that it is not possible to install new Python packages under Windows using anything other than setuptools. (See, eg. https://www.microsoft.com/en-gb/download/details.aspx?id=44266 and skip to Install Instructions.)
there are a number of hardcoded paths in moduleSetup.py and PyTransSetup.py that assume PyTransport is running on a UNIX-like system that uses '/' to separate the components of pathnames. But this is easily fixable; os.path.join can join any number of leaf elements together to make a properly-separated path for whatever platform it is running on.
I also made a few other changes:
instead of using sys.path.append() to add paths to the Python search list, I've used site.addsitedir() which is the preferred method (eg. it filters for duplicates)
in order to get setuptools to install correctly, the PYTHONUSERBASE environment variable needs to be set to point to the install path. This means I've had to switch subprocess.call() for the slightly more complex subprocess.Popen(), which allows a modified environment to be passed to the newly spawned subprocess
we found it was necessary to add ignore_errors=True to the rmtree() invocation. On Windows there doesn't seem to be a build folder left in-tree, so otherwise this fails because the folder cannot be found. (Probably Visual C++ uses a different temporary location.)
With these changes, PyTransport now builds and works for me on Windows 10 using Pythonxy.
Since PyTransport is standard Python, it should run fine on Windows. At the moment it won't install, but the only obstructions seem to be with compiling and installing the Python packages for each inflationary model. The key obstructions are:
distutils
can't find the Visual C++ compiler. This is a showstopper. It appears that it is not possible to install new Python packages under Windows using anything other thansetuptools
. (See, eg. https://www.microsoft.com/en-gb/download/details.aspx?id=44266 and skip to Install Instructions.)there are a number of hardcoded paths in
moduleSetup.py
andPyTransSetup.py
that assume PyTransport is running on a UNIX-like system that uses '/' to separate the components of pathnames. But this is easily fixable;os.path.join
can join any number of leaf elements together to make a properly-separated path for whatever platform it is running on.I also made a few other changes:
instead of using
sys.path.append()
to add paths to the Python search list, I've usedsite.addsitedir()
which is the preferred method (eg. it filters for duplicates)in order to get
setuptools
to install correctly, thePYTHONUSERBASE
environment variable needs to be set to point to the install path. This means I've had to switchsubprocess.call()
for the slightly more complexsubprocess.Popen()
, which allows a modified environment to be passed to the newly spawned subprocesswe found it was necessary to add
ignore_errors=True
to thermtree()
invocation. On Windows there doesn't seem to be abuild
folder left in-tree, so otherwise this fails because the folder cannot be found. (Probably Visual C++ uses a different temporary location.)With these changes, PyTransport now builds and works for me on Windows 10 using Pythonxy.