Troubleshooting
Here we collect a few tips on how to solve problems you may encounter when installing or running TreePPL. If you cannout solve your problem using any of the tips listed here, please open an issue on TreePPL's github repo. If you find errors or have suggestions for improvement in the documentation, report it to the web site repo. You can also contribute to addressing the issue(s) yourself.See instructions here.
Installation
Installing the python package on MacOS with homebrew
brew install python will make python available using the command python3. Similarly, pip will be available as pip3. However, Homebrew will print an error message if you try to install the TreePPL package using pip3 install <name_of_file.whl>.
The message that is printed by Homebrew will recommend you to install and run the package in a virtual environment. The message also gives you all the instructions you need in order to do so. In short, navigate to a directory you wish to use for your TreePPL projects, and then use the following commands:
... % python3 -m venv env
... % source env/bin/activate
(env) ... % pip install <name_of_file.whl>
You can use any name for your environment, but it is customary to choose env.
To use TreePPL through the python package, run
(env) ... % python
>>> import treeppl
At the end of your session, deactivate your virtual environment using
>>> quit
(env) ... % deactivate
... %
This will bring you back to your terminal window.
Installing the developer version of TreePPL on MacOS
We have noticed that on MacOS systems with legacy versions of compilers and developer tools, it may be necessary to set the environment variable SDKROOT before installing the OCaml packages. Otherwise, problems may occurr during compilation of owl.
To address this, proceed according to instructions but add one more flag before installing the OCaml packages. Specifically, after exporting OWL_CPPFLAGS and before compiling OCaml packages, add an export of the appropriate path to the developer tools on your system (should be the one given below), as indicated below.
rm $HOMEBREW_PREFIX/bin/cc
export OWL_LDFLAGS="-L/opt/homebrew/opt/libomp/lib -lomp"
export OWL_CPPFLAGS="-Xpreprocessor -fopenmp"
export SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
After this, proceed according to the standard instructions.