Skip to content

macOS Optional Dependencies

Olivier Michel edited this page Oct 3, 2022 · 23 revisions

Python 3.7, 3.8, 3.9 and 3.10

To use the Python API you will need to install the latest version of Python 3.7, 3.8, 3.9 and 3.10 from https://www.python.org And the brew version too:

brew update
brew install python@3.7 python@3.8 python@3.9 python@3.10

Java

To use the JAVA API you will need to install the Java SE Development Kit 16.0.2 for Mac OS X from: https://www.oracle.com/java/technologies/javase-jdk16-downloads.html

Requirements to create the Webots .dmg package

appdmg is required to create the Webots .dmg package:

brew install node
npm install -g appdmg

Create a test Webots.app bundle

In order to launch Webots directly from Finder you could create a Webots.app directory with symbolic links to the Webots local repository content as following:

cd ~
mkdir Webots.app
cd Webots.app/
ln -s ${WEBOTS_HOME}/Contents Contents
ln -s ${WEBOTS_HOME}/resources resources
ln -s ${WEBOTS_HOME}/lib lib
ln -s ${WEBOTS_HOME}/bin bin
ln -s ${WEBOTS_HOME}/change_logs change_logs
ln -s ${WEBOTS_HOME}/doc doc
ln -s ${WEBOTS_HOME}/include include
ln -s ${WEBOTS_HOME}/projects projects
ln -s ${WEBOTS_HOME}/util util

Web interface with wren.js

To be able to compile the streaming-viewer, you need python 3, pyclibrary and Emscripten

pyclibrary

Enter the following command in a terminal: pip install pyclibrary

Emscripten

Run the following commands in a terminal:

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

# Enter that directory
cd emsdk

# Download and install the latest SDK tools.
./emsdk install latest

# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest

Then uncomment the line source $HOME/emsdk/emsdk_env.sh >/dev/null 2>&1 in bash_profile.mac that is in webots/script/install.

Run the following commands from Webots home folder:

cat scripts/install/bash_profile.mac >> ~/.bash_profile
cat scripts/install/bash_profile.mac >> ~/.zprofile
source ~/.bash_profile
Clone this wiki locally