install:macos

This is an old revision of the document!


The latest release 4.9 should work on all Mac OS versions greater or equal to 11. The installation requires a couple of steps (of which you have maybe done some already for other reasons):

  • Install the xcode command line tools
  • (for some versions) install SDK headers
  • install Homebrew
  • install Perlbrew
  • install some dependencies using Homebrew
  • install some dependencies using Perlbrew/cpanm
  • install a python dependence
  • download and install polymake

For all steps you need an open Terminal. You can find the Terminal app in the Subfolder Utilities of Applications.

If you don't want to install Homebrew, you can try to install dependencies yourself. Some instructions are here.

In the terminal type

xcode-select --install

Either this tells you that your command line tools are installed or opens a small window that asks you whether you want to install them. Confirm. It also offers to install the full XCode IDE. This is not necessary and not recommended (you then need to install the command line tools on top from within XCode).

Then, you should type

export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/

and do all following steps in this terminal (or repeat the export command, if you open a new one).

Installation instructions are here. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal, that is:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Installation instructions are here. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal, that is:

\curl -L https://install.perlbrew.pl | bash

Now add some paths to your Terminal config and reload the config. Type the following lines in the terminal:

echo "export PERL5LIB=$HOME/perl5/lib/perl5:$HOME/perl5${PERL5LIB+:$PERL5LIB}" >> $HOME/.zshrc
echo "source ~/perl5/perlbrew/etc/bashrc" >> $HOME/.zshrc
echo 'export ARCHFLAGS="-arch x86_64"' >> $HOME/.zshrc
source $HOME/.zshrc

Run the following lines in your terminal:

brew install gmp
brew install mpfr
brew install boost
brew install readline
brew install ppl
brew install flint
brew install singular
brew install python3
brew install ninja
brew install ccache

Run the following lines in your terminal:

yes N | perlbrew install-cpanm
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm SVG
cpanm Moo
cpanm MongoDB
cpanm JSON
cpanm install Net::SSLeay
cpanm Term::ReadLine::Gnu
pip3 install jupyter --user

This may complain about a path not being set. If so, add this to your $PATH-variable.

You find the sources here. Get the source tarball from the Linux section of that page. Download to Downloads.

In the terminal do

cd Downloads
tar -xvfj polymake-4.9.tar.bz2

Essentially, polymake is compiled and installed with the following commands. This will put the polymake binary into /usr/local. You may have to use sudo for installing.

cd ~/Downloads/polymake-4.9
./configure --without-java
ninja -C build/Opt -j2 install

However, we recommend to install into a directory in your $HOME-folder. For this, create a folder with

mkdir $HOME/<polymake_install_folder>

where <polymake_install_folder> is a name of your choice, e.g. polymake_bin. Then compile and install with (replace with the correct folder name!)

cd ~/Downloads/polymake-4.9
./configure --without-java --prefix=$HOME/<polymake_install_folder>
ninja -C build/Opt -j2 install

You can then call polymake with

$HOME/<polymake_install_folder>/bin/polymake

or add $HOME/<polymake_install_folder>/bin/ to your path.

  • install/macos.1675350973.txt.gz
  • Last modified: 2023/02/02 15:16
  • by casabella