Installing mujoco-py v1.5 on windows10

This post is based on instructions here.

Step 1: get a mjkey

The first thing is to acquire a mujoco key.

Go to this site. Fill in the blanks. There are several user types:

  1. trial allows you one month usage for free. The site will check the computer id, so it is not possible to acquire a second trial key for the same computer.
  2. student allows you one year usage on only one computer for free. Note that this is registered by the school email and one account can only apply to one computer. If you want to renew your access, you better register a new account with a new student email.
  3. personal. If you don’t tend to pay, never try this one! Your email will be locked up if you register but don’t pay, so that the same email cannot be used for the student account!

Finishing the above, you will receive an email with mjkey.txt enclosed. Save it to your disk.

Step 2: download the software

the link for windows.

Download and unzip to your computer, anywhere as long as you remember.

Theoretically mjkey.txt can be placed anywhere, but I tend to place it inside the unzipped folder mjpro150

Step 3: set the environment variables

To let the system know where to find the software, you need to set three variables:

  1. MUJOCO_PY_MJKEY_PATH the path to mjkey.txt.
  2. MUJOCO_PY_MJPRO_PATH the path to the unzipped folder.
  3. Path add MUJOCO_PY_MJPRO_PATH\bin, e.g. C:\mjpro\bin

Step 4: install mujoco-py

Type pip install -U 'mujoco-py<1.50.2,>=1.50.1' in your python console.

I encountered the following error, claiming to require dependencies on VS14 build tools.在这里插入图片描述
To solve this, refer to this post.

你可能感兴趣的:(坑)