Member Site Forums PyRosetta PyRosetta – Build/Install Colab Install Help

Viewing 1 reply thread
  • Author
    Posts
    • #3450
      Anonymous

        I’m trying to install Pyrosetta using Colab with the workshop notebooks but I keep getting errors. The main error is locating the tar file in My Drive. The code I’m running is: 

        #sys.path.insert(0, google_drive_packages_path)

         

        # installing PyRosetta

        if sys.version_info.major != 3 or sys.version_info.minor != 6:

            print(‘Need Python-3.6 to run!’)

            sys.exit(1)

         

        import_start_time = time.time()

         

        # upload PyRosetta Linux package into your google drive and put it path here

        pyrosetta_distr_path = google_drive.replace(‘ ‘, ‘\ ‘) + ‘/PyRosetta/*’

         

        !tar xjf $pyrosetta_distr_path -C PyRosetta –strip-components=1

        !cd PyRosetta/setup && python setup.py install –install-lib=$pyrosetta_install_prefix_path

        !rm -rf PyRosetta

         

        import_end_time = time.time()

         

        print(f’PyRosetta setup took: {import_end_time – import_start_time:.1f}s…’)

        I have a folder called Pyrosetta in My Drive as directed. I think the problem lies here pyrosetta_distr_path = google_drive.replace(‘ ‘, ‘\ ‘) + ‘/PyRosetta/*’ 

         

        tar (child): /content/google_drive/My Drive/PyRosetta/*: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now /bin/bash: line 0: cd: PyRosetta/setup: No such file or directory PyRosetta setup took: 2.2s…

        When I go to put the path for the tar file instead I get an invalid syntax error. 

        Not really sure how to solve this. 

      • #15325
        Anonymous

          Nevermind. I just simplied the code of the tutorial and was able to get it to work.

          • #15677
            Anonymous

              Hi I get this same problem. Could you explain how you resolved this issue? Thank you! 

            • #15722
              Anonymous

                It may be that the glob pattern (/PyRosetta/*) is not being properly expanded with the Notebook environment. (Normally it’s the shell which does the expansion.) What you can try is to pass the tar command the full explicit path to the file, rather than using wildcards.

          Viewing 1 reply thread
          • You must be logged in to reply to this topic.