You are here

PyRosetta Build on Ubuntu 18.04

2 posts / 0 new
Last post
PyRosetta Build on Ubuntu 18.04

Hello everyone,

I want to draw your attention that I am failing to build PyRosetta on the new Ubuntu 18.04 (released last week).

My setup:

  • Ubuntu Linux 18.04 64bit (server)
  • Python 3.6.5
  • PyRosetta 4 python36 ubuntu release 177


I build as per the documented method (which works in older Linux versions):

  • tar -vjxf {PYROSETTA}.tar.bz2
  • sudo python3 {PYROSETTA}/setup/ install

But I get the following error:

Traceback (most recent call last):
  File "", line 4, in <module>
    import ez_setup
  File "/root/PyRosetta4.Release.python36.ubuntu.release-177/setup/", line 24, in <module>
    from distutils import log
ImportError: cannot import name 'log'


I attempt to fix this error by reinstalling distutils  through sudo apt install python3-distutils at which point I get this error:

Traceback (most recent call last):
  File "", line 18, in <module>
    exec(, command_ns)
  File "<string>", line 8, in <module>
  File "/tmp/tmpuvw_51ko/setuptools-3.3/setuptools/", line 12, in <module>
    from setuptools.extension import Extension
  File "/tmp/tmpuvw_51ko/setuptools-3.3/setuptools/", line 7, in <module>
    from setuptools.dist import _get_unpatched
  File "/tmp/tmpuvw_51ko/setuptools-3.3/setuptools/", line 16, in <module>
    import pkg_resources
  File "/tmp/tmpuvw_51ko/setuptools-3.3/", line 1479, in <module>
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
Traceback (most recent call last):
  File "", line 5, in <module>
  File "/root/PyRosetta4.Release.python36.ubuntu.release-177/setup/", line 189, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "/root/PyRosetta4.Release.python36.ubuntu.release-177/setup/", line 141, in _do_download
    _build_egg(egg, archive, to_dir)
  File "/root/PyRosetta4.Release.python36.ubuntu.release-177/setup/", line 79, in _build_egg
    raise IOError('Could not build the egg.')
OSError: Could not build the egg.


I hope you guys can explain what is going on and how to overcome these errors.



 - - UPDATE - -

I spent the last 2 days looking into this and I tried to install PyRosetta4 python 3.6 release 175 176 177 on different linux server distros and they all failed (red hat, debian, ubuntu 16.04/17.10/18.04, and arch), I used the respective release for each distro: ubuntu release with ubuntu and debian, linux release with the others.

What did work perfectly was PyRosetta4 python 3.5 (everywhere), so could it be a problem between python 3.5 and 3.6? I don't know I am just relaying my observations.

Post Situation: 
Mon, 2018-04-30 22:35

From what I hear, the most common way to get the "Could not build the egg" error with PyRosetta is to do the build and install phases with two different versions of Rosetta. (Or do a partial build with one version and finish with another.)

So that might have been the issue - if you were accidentally doing a mixed Python3.5/Python3.6 installation, things would choke the way you saw them.

Wed, 2018-08-01 15:49