Install OpenAI Gym
bash <(curl -Ls https://raw.githubusercontent.com/andrewschreiber/scripts/master/gym_installer.sh)
https://medium.com/@thelastalias/simple-setup-of-openai-gym-on-macos-287cf0194ac2
Collection of shell scripts
Install OpenAI Gym
bash <(curl -Ls https://raw.githubusercontent.com/andrewschreiber/scripts/master/gym_installer.sh)
https://medium.com/@thelastalias/simple-setup-of-openai-gym-on-macos-287cf0194ac2
hi, i cannot complete installation as the package boost-python cannot be found. i downloaded boost-python3 instead but it still exits the installer. im using mac Monterey 12.3.1
**** OPENAI GYM SETUP SCRIPT ****
(Part 6) Download and run an example agent
File βexample_agent.pyβ already there; not retrieving.
Traceback (most recent call last):
File "/Users/.../example_agent.py", line 3, in
env = gym.make('Copy-v0')
File "/Users/.../local/miniconda3/lib/python3.10/site-packages/gym/envs/registration.py", line 569, in make
_check_version_exists(ns, name, version)
File "/Users/.../local/miniconda3/lib/python3.10/site-packages/gym/envs/registration.py", line 219, in _check_version_exists
_check_name_exists(ns, name)
File "/Users/.../local/miniconda3/lib/python3.10/site-packages/gym/envs/registration.py", line 197, in _check_name_exists
raise error.NameNotFound(
gym.error.NameNotFound: Environment Copy doesn't exist.
See below for an excerpt of the received error:
fatal error: mjmodel.h: No such file or directory
#include "mjmodel.h"
^~~~~~~~~~~
compilation terminated.
error: command '/usr/local/bin/gcc-7' failed with exit status 1
Failed building wheel for mujoco-py
Running setup.py clean for mujoco-py
Failed to build mujoco-py
Installing collected packages: mujoco-py, gym
Running setup.py install for mujoco-py ... error
Complete output from command /Applications/anaconda/envs/p35/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-qs6444fq-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'mujoco_py.cymj' extension
/usr/local/bin/gcc-7 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/anaconda/envs/p35/include -arch x86_64 -I/Applications/anaconda/envs/p35/include -arch x86_64 -DONMAC -Imujoco_py -I/private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/mujoco_py -I/Users/mweber/.mujoco/mjpro150/include -I/Applications/anaconda/envs/p35/lib/python3.5/site-packages/numpy/core/include -I/Applications/anaconda/envs/p35/include/python3.5m -c /private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/mujoco_py/cymj.c -o /private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/mujoco_py/generated/_pyxbld_MacExtensionBuilder/temp.macosx-10.6-x86_64-3.5/private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/mujoco_py/cymj.o -fopenmp -w
/private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/mujoco_py/cymj.c:573:10: fatal error: mjmodel.h: No such file or directory
#include "mjmodel.h"
^~~~~~~~~~~
compilation terminated.
error: command '/usr/local/bin/gcc-7' failed with exit status 1
----------------------------------------
Command "/Applications/anaconda/envs/p35/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-qs6444fq-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/rv/7r2c88sx7kbgcgb605v0116c0000gn/T/pip-build-mw16rf7s/mujoco-py/
Thanks for this helpful script.
On my Mac (Catalina 10.15.2), I don't have pip but homebrew instead.
I ran this script and, after PART 1 it exits with out any error but doesn't install Gym either.
Log below from my run on my Terminal session. After I press Enter to continue for Part 2, it just comes to the terminal command prompt without any further action.
Setting up Gym & dependencies. Takes 5-15 minutes, based on internet speed.
Press enter to begin <<
**** OPENAI GYM SETUP SCRIPT ****
[PART 1] Setup Homebrew & system dependencies
Reaching out to Homebrew...
[CHECK] Homebrew already installed. Updating Homebrew.
Already up-to-date.
[CHECK] Homebrew successfully updated.
Install Xcode Command Line Tools...
If you have already installed Xcode CLT, you will see an error. That is fine.
Press enter to continue <<
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
[CHECK] Xcode Command Line Tools successfully configured.
[CHECK] cmake already installed.
Installing swig...
==> Downloading https://homebrew.bintray.com/bottles/swig-4.0.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/d4/d44eb5e2ae81970d131618c4ddd508d3d798e9465979a125454db75c3b9125e1?__gda__=exp=1579
######################################################################## 100.0%
==> Pouring swig-4.0.1.catalina.bottle.tar.gz
πΊ /usr/local/Cellar/swig/4.0.1: 723 files, 5.4MB
==> brew cleanup
has not been run in 30 days, running now...
Removing: /Users/viyer/Library/Caches/Homebrew/cmake--3.15.5.catalina.bottle.tar.gz... (15.0MB)
Removing: /Users/viyer/Library/Caches/Homebrew/ffmpeg--4.2.1_2.catalina.bottle.tar.gz... (20.7MB)
Removing: /Users/viyer/Library/Caches/Homebrew/frei0r--1.6.1.catalina.bottle.1.tar.gz... (476.4KB)
Removing: /Users/viyer/Library/Caches/Homebrew/fribidi--1.0.7.catalina.bottle.tar.gz... (124.8KB)
Removing: /Users/viyer/Library/Caches/Homebrew/git--2.24.0_2.catalina.bottle.tar.gz... (17.3MB)
Removing: /Users/viyer/Library/Caches/Homebrew/glib--2.62.3.catalina.bottle.tar.gz... (4.5MB)
Removing: /Users/viyer/Library/Caches/Homebrew/gnutls--3.6.10.catalina.bottle.tar.gz... (3.0MB)
Removing: /Users/viyer/Library/Caches/Homebrew/gts--0.7.6_1.catalina.bottle.1.tar.gz... (395.2KB)
Removing: /Users/viyer/Library/Caches/Homebrew/ilmbase--2.3.0.catalina.bottle.tar.gz... (1.2MB)
Removing: /Users/viyer/Library/Caches/Homebrew/isl--0.21.catalina.bottle.tar.gz... (1.4MB)
Removing: /Users/viyer/Library/Caches/Homebrew/leptonica--1.78.0_1.catalina.bottle.tar.gz... (2.4MB)
Removing: /Users/viyer/Library/Caches/Homebrew/libvpx--1.8.1.catalina.bottle.1.tar.gz... (717.7KB)
Removing: /Users/viyer/Library/Caches/Homebrew/netpbm--10.73.27.catalina.bottle.tar.gz... (1.5MB)
Removing: /Users/viyer/Library/Caches/Homebrew/numpy--1.17.4.catalina.bottle.tar.gz... (4MB)
Removing: /Users/viyer/Library/Caches/Homebrew/opencv--4.1.2.catalina.bottle.1.tar.gz... (79.9MB)
Removing: /Users/viyer/Library/Caches/Homebrew/openexr--2.3.0.catalina.bottle.tar.gz... (4.4MB)
Removing: /Users/viyer/Library/Caches/Homebrew/python--3.7.5.catalina.bottle.tar.gz... (14.8MB)
Removing: /Users/viyer/Library/Caches/Homebrew/scipy--1.3.3.catalina.bottle.tar.gz... (16MB)
Removing: /Users/viyer/Library/Caches/Homebrew/tbb--2019_U9.catalina.bottle.tar.gz... (699.4KB)
Removing: /Users/viyer/Library/Caches/Homebrew/tesseract--4.1.0.catalina.bottle.tar.gz... (11.8MB)
Removing: /Users/viyer/Library/Caches/Homebrew/unbound--1.9.5.catalina.bottle.tar.gz... (2.4MB)
Removing: /Users/viyer/Library/Caches/Homebrew/webp--1.0.3.catalina.bottle.tar.gz... (858.6KB)
Removing: /Users/viyer/Library/Caches/Homebrew/xvid--1.3.5.catalina.bottle.tar.gz... (448.5KB)
Removing: /Users/viyer/Library/Logs/Homebrew/rubberband... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/ceres-solver... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/lame... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libtiff... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libtool... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/gmp... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/wget... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/ffmpeg... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libidn2... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/xvid... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/ilmbase... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/little-cms2... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libpng... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/frei0r... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/nettle... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/pixman... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/gdbm... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/cmake... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/opus... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/freetype... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/mpfr... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/rtmpdump... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/python... (3 files, 141.4KB)
Removing: /Users/viyer/Library/Logs/Homebrew/libsamplerate... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libvorbis... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/gts... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libunistring... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/openjpeg... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/speex... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libogg... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/icu4c... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/harfbuzz... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libbluray... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/glib... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/metis... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/readline... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/netpbm... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/glog... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/aom... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/tbb... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/tesseract-lang... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/graphite2... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/gcc... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/tesseract... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/cairo... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/webp... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/sqlite... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/fribidi... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/eigen... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/xz... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/numpy... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/openexr... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/fontconfig... (29.3KB)
Removing: /Users/viyer/Library/Logs/Homebrew/gflags... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/openblas... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/giflib... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/opencv... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libvpx... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/snappy... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/flac... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/gettext... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/graphviz... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/opencore-amr... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libtasn1... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/suite-sparse... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/gd... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/isl... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/pcre2... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libevent... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/[email protected]... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/leptonica... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/pcre... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/x264... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libvidstab... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/x265... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libsoxr... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/unbound... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/jpeg... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/theora... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/sdl2... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libass... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/scipy... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libsndfile... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/jasper... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/p11-kit... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/git... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/lzo... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libffi... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/libmpc... (64B)
Removing: /Users/viyer/Library/Logs/Homebrew/gnutls... (64B)
Pruned 0 symbolic links and 5 directories from /usr/local
Installing boost...
==> Downloading https://homebrew.bintray.com/bottles/boost-1.72.0.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/75/75407eb4e779185ff8efbbcaa55683692d12c5512b20fdf6c25f4fc1982123d5?__gda__=exp=1579
######################################################################## 100.0%
==> Pouring boost-1.72.0.catalina.bottle.tar.gz
πΊ /usr/local/Cellar/boost/1.72.0: 14,466 files, 648.6MB
Installing boost-python...
==> Downloading https://homebrew.bintray.com/bottles/boost-python-1.72.0.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/c1/c15c8bf03d5ca454c93782648f700c1149c164bec8334561ef3727eee0f0435a?__gda__=exp=1579
######################################################################## 100.0%
==> Pouring boost-python-1.72.0.catalina.bottle.tar.gz
==> Caveats
This formula provides Boost.Python for Python 2. Due to a
collision with boost-python3, the CMake Config files are not
available. Please use -DBoost_NO_BOOST_CMAKE=ON when building
with CMake or switch to Python 3.
==> Summary
πΊ /usr/local/Cellar/boost-python/1.72.0: 460 files, 5.5MB
[CHECK] sdl2 already installed.
[CHECK] wget already installed.
[PART 1] Success!
**** OPENAI GYM SETUP SCRIPT ****
[PART 2] Setup Python 3.5 / Conda
[TIP] Say 'yes' to each prompt that asks
[TIP] Scroll down the license by holding enter
Press enter to continue <<
Error while running install script on Mac OS X High Sierra
Hi, the installation ends at part 1. Do you know how I can move forward to the next parts?
**** OPENAI GYM SETUP SCRIPT ****
[PART 1] Setup Homebrew & system dependencies
Reaching out to Homebrew...
[CHECK] Homebrew already installed. Updating Homebrew.
Already up-to-date.
[CHECK] Homebrew successfully updated.
Install Xcode Command Line Tools...
If you have already installed Xcode CLT, you will see an error. That is fine.
Press enter to continue <<
xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates
[CHECK] Xcode Command Line Tools successfully configured.
[CHECK] cmake already installed.
[CHECK] swig already installed.
[CHECK] boost already installed.
Installing boost-python...
Warning: No available formula with the name "boost-python". Did you mean boost-python3?
==> Searching for similarly named formulae and casks...
==> Formulae
boost-python3 β
To install boost-python3 β, run:
brew install boost-python3 β
==> Casks
boost-note β
To install boost-note β, run:
brew install --cask boost-note β
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.