# PyRosetta on Ubuntu 16.04 build error

5 posts / 0 new
PyRosetta on Ubuntu 16.04 build error
#1

- OS type/version/arch:
Linux Ubuntu 16.04  (on an Azure virtual machine)
- Python version:
3.5

- Version of PyRosetta including SVN revision number.
PyRosetta4.Release.python35.ubuntu.release-236.tar.bz2

- Version of Rosetta:
Rosetta 3.11 for Linux

Hello, I've installed PyRosetta and upon importing in Python3.5 I receive the following error:

ImportError: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.27' not found (required by /anaconda/envs/py35/lib/python3.5/site-packages/pyrosetta-2019.42+release.36665092fdf-py3.5-linux-x86_64.egg/pyrosetta/rosetta.so)

To cut to the chase, given this error above, I've learned that either I must upgrade my Ubuntu to 18.04 or use an older version of PyRosetta (because my glibc is v. 2.23, and that it's inadvisable / no easy way to update glibc).

When I look at older versions of PyRosetta, I see a build compatible with Ubuntu 12.04... I just want to confirm with anyone on the forum, is there any PyRosetta version designed for Ubuntu 16.04? I couldn't find anything. I'll likely be upgrading my VM's OS to 18.04 and take it from there unless anyone has a better suggestion.

Thank you so much for your help!

Category:
Post Situation:
Fri, 2019-11-29 10:23
denatured

One thing you can try is the Scientific/Red Hat Linux version. Red Hat Linuxes tend to be less cutting edge than the Ubuntu Linuxes, so they'll typically use older versions of GLIBC. This may or may not work, based on the other libraries on your system though. (But if it does work, it's probably the easiest.)

If that doesn't work for you, you could potentially try compiling PyRosetta yourself from the Rosetta source, but that's a bit more involved. If this is truely a virtual machine you're using specifically for PyRosetta runs, it might be simpler/better just to update to a 18.04 VM. (Though if you have reasons to stick with 16.04 we can help you work through the PyRosetta compilation.)

Fri, 2019-11-29 10:34
rmoretti

Thank you for your reply. I've tried the Scientific/Red Hat Linux version but the same error occurred but perhaps it's because this install is not being made cleanly. Is there are a clean way to remove the existing PyRosetta installation? I searched for the documentation but didn't find any guidance on its removal.

I'm going to try installing PyRosetta binaries from the Rosetta source, and then lastly if that fails, try the ubuntu install offered with binaries compiled in debugging.

Fri, 2019-11-29 14:12
denatured

Just wanted to provide an update. I've resolved the versioning issue by building on Ubuntu 18.04, and the build had almost completed until I was hit with this error below:

[7030/7031] Building C object CMakeFiles/libxml2.dir/home/baverso/rosetta_bin_linux_2019.35.60890_bundle/main/source/external/libxml2/xmlschemas.c.o
[7031/7031] Linking CXX shared library pyrosetta/rosetta.so

Creating Python package at: /home/bav/pyrosetta/...
Traceback (most recent call last):
File "build.py", line 874, in <module>
main(sys.argv)
File "build.py", line 863, in main
if Options.create_package: create_package(rosetta_source_path, Options.create_package)
File "build.py", line 761, in create_package
generate_version_file(rosetta_source_path, path + '/version.json')
File "build.py", line 660, in generate_version_file
else: shutil.copy(rosetta_source_path + '/.version.json', file_name)
File "/usr/lib/python3.6/shutil.py", line 245, in copy
File "/usr/lib/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/home/bav/rosetta_bin_linux_2019.35.60890_bundle/main/source/.version.json'

I navigated to the directory where the missing file was and this is what's within it:

bav@02:~/rosetta_bin_linux_2019.35.60890_bundle/main/source\$ ls -a
.                   BuildDocs.sh  __pycache__         code_templates  make_ctags.sh             remove_build.sh  tools                             version.pyc
..                  Doxyfile.src  accept_utracers.sh  conda           ninja_build.py            scons.py         update_ResidueType_enum_files.sh  xcode
.gitignore          GUIs          bin                 doc             performance-benchmark.py  scripts          update_options.sh
.sconsign.dblite    SConscript    build               external        projects.settings         src              update_submodules.sh
.ycm_extra_conf.py  SConstruct    cmake               ide             readme.txt                test             version.py`

Any suggestions on what could resolve this? Thanks so much!

Fri, 2019-11-29 21:27
denatured

Just an update: My issue is resolved. I built my own json file after seeing an example online to resolve the issue.

Mon, 2019-12-02 12:09
denatured