# PyRosetta on a HPC

2 posts / 0 new
PyRosetta on a HPC
#1

Hello people,  i have been trying to compile PyRosetta on a HPC (Red Hat 6.4) for several weeks now without success.

I tried many different approaches so i will write the gist of it.  I tried compiling PyRosetta which did not work, then I read i have to compile it from source, so this is what I am trying to do. I uploaded Rosetta to the HPC.

most of the programs are old, so I had to install python3.6.1, Cmake 3.5.9, GCC 5.3.0, and Ninja 1.9.0

I cd into the {ROSETTA}/main/source/src/python/PyRosetta directory and use the following command to compile:

python3.6 build.py -j24 --python-lib /app/utils/python3/Python-3.6.1/lib/libpython3.6m.a --python-include-dir /app/utils/python3/Python-3.6.1/ --create-package PyRosetta

And even though i ensure that all the programs installed are working, and i point the command to python 3  i still get this error:

Found PythonInterp: /usr/bin/python (found version "2.6.6")
-- Configuring incomplete, errors occurred!

CMake Error at CMakeLists.txt:611 (message):
Python 2.7 or newer is required

Thank you

- - - - - - - - - - - -

The Next step is to install PyRosetta on a virtualenv of course right?

Category:
Post Situation:
Thu, 2019-03-14 02:00
ac.research

One of the issues you're running into here is that even though the PyRosetta build.py script is using Python3.6, there's other stages in the protocol which are being launched, and they're using other Pythons (because they need Python2, or just because they autodetect which Python to use, rather than using the explicit Python being used to launch the main build.py script. In this case, the build.py script launches a CMake sub-process, which then does its own autodetection of the system python, finding it at /usr/bin/python, which on your system is Python2.6.

I'm not sure if there's a way to tell CMake to use a particular different Python. My recommended approach would probably be to (temporarily) change your system environment such that the main "python" interpreter found in your path would be either Python2.7 or the Python3.6.

There's a number of ways to do this, but a virtual environment system is certainly a decent choice.

Wed, 2019-07-10 10:17
rmoretti