question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to install on google colab after forking the dm_control in your github account?

See original GitHub issue

This was the error I received after trying to install the fork or clone of dm_control stored in my github account

ERROR: Command errored out with exit status 1: /usr/bin/python3 -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/content/src/dm-control/setup.py’“'”‘; file=’“'”‘/content/src/dm-control/setup.py’“'”‘;f = getattr(tokenize, ‘"’“‘open’”’“‘, open)(file) if os.path.exists(file) else io.StringIO(’”‘“‘from setuptools import setup; setup()’”’“‘);code = f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ develop --no-deps Check the logs for full command output.

this is the code I executed on google colab for installing the fork of dm_control stored in my github account

##@title Run to install MuJoCo anddm_control` import distutils.util import subprocess if subprocess.run(‘nvidia-smi’).returncode: raise RuntimeError( 'Cannot communicate with GPU. ’ 'Make sure you are using a GPU Colab runtime. ’ ‘Go to the Runtime menu and select Choose runtime type.’)

mujoco_dir = “$HOME/.mujoco”

print(‘Installing OpenGL dependencies…’) !apt-get update -qq !apt-get install -qq -y --no-install-recommends libglew2.0 > /dev/null

print(‘Downloading MuJoCo…’) MUJOCO_VERSION = 210 MUJOCO_ARCHIVE = ( f’mujoco{MUJOCO_VERSION}-{distutils.util.get_platform()}.tar.gz’) !wget -q “https://mujoco.org/download/{MUJOCO_ARCHIVE}” !wget -q “https://mujoco.org/download/{MUJOCO_ARCHIVE}.sha256” check_result = !shasum -c “{MUJOCO_ARCHIVE}.sha256” if _exit_code: raise RuntimeError( ‘Downloaded MuJoCo archive is corrupted (checksum mismatch)’)

print(‘Unpacking MuJoCo…’) MUJOCO_DIR = ‘$HOME/.mujoco’ !mkdir -p “{MUJOCO_DIR}” !tar -zxf {MUJOCO_ARCHIVE} -C “{MUJOCO_DIR}”

Configure dm_control to use the EGL rendering backend (requires GPU)

%env MUJOCO_GL=egl

print(‘Installing dm_control…’)

Installing dm_control

#################!pip install -q dm_control==0.0.403778684 #commented out

instead of using deepmind account use the fork of dm_control in your account

!pip install -e git+https://github.com/navidyou/dm_control#egg=dm_control==0.0.403778684

print(‘Checking that the dm_control installation succeeded…’) try: from dm_control import suite env = suite.load(‘cartpole’, ‘swingup’) pixels = env.physics.render() except Exception as e: raise e from RuntimeError( 'Something went wrong during installation. Check the shell output above ’ ‘for more information.\n’ 'If using a hosted Colab runtime, make sure you enable GPU acceleration ’ ‘by going to the Runtime menu and selecting “Choose runtime type”.’) else: del suite, env, pixels `

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
alimuldalcommented, Jan 31, 2022

Try removing the -e flag from your pip install invocation (“edit-mode” installations don’t work because of the way we automatically generate the ctypes bindings for MuJoCo during the build process)

1reaction
saran-tcommented, Jan 31, 2022

Could you please try again with the updated Colab notebook that was uploaded today?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use Google Colab with GitHub via Google Drive
Step 2: Mount Google Drive to Google Colab Notebook · Click the link to authenticate user Google account · Select the respective Google...
Read more >
Google Colab - Install from GitHub? GLRM - Stack Overflow
A good way is to clone the git hub folder like this: !git clone https://github.
Read more >
dm_control/tutorial.ipynb at main - GitHub
'Make sure you are using a GPU Colab runtime. ' 'Go to the Runtime menu and select Choose runtime type.') print('Installing dm_control.
Read more >
How to Install and Use Git in Google Colab? - GeeksforGeeks
Colab or Colaboratory is a cloud-based Jupyter environment from Google. It was developed by the Research Team at Google to build and test ......
Read more >
Using Google Colab to open notebooks in a GitHub repository
A quick demo of using Google Colab to access, open, edit, and save a Jupyter notebook that is part of an existing GitHub...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found