install:macos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
install:macos [2020/02/06 13:31] paffenholzinstall:macos [2020/05/31 23:16] – [Install Perlbrew] paffenholz
Line 1: Line 1:
-==== Install polymake on Mac OS ====+===== Install polymake on Mac OS =====
  
 The latest release 4.0 should work on all Mac OS versions greater or equal to 10.11. The installation requires a couple of steps (of which you have maybe done some already for other reasons): The latest release 4.0 should work on all Mac OS versions greater or equal to 10.11. The installation requires a couple of steps (of which you have maybe done some already for other reasons):
Line 13: Line 13:
 For all steps you need an open Terminal. You can find the Terminal app in the Subfolder //Utilities// of //Applications//. For all steps you need an open Terminal. You can find the Terminal app in the Subfolder //Utilities// of //Applications//.
  
-=== Install the Command Line Tools ===+If you don't want to install Homebrew, you can try to install dependencies yourself. Some instructions are [[install:macos:source|here]]. 
 + 
 +==== Install the Command Line Tools ====
  
 In the terminal type In the terminal type
 <code>xcode-select --install</code> <code>xcode-select --install</code>
 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** neccessary and **not** recommended (you then need to install the command line tools on top from whithin XCode).  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** neccessary and **not** recommended (you then need to install the command line tools on top from whithin XCode). 
 +
 +
 +==== Special Instructions for Mac OS 10.14 and 10.15 ====
  
 On MacOS **10.14** you may need an additional step. Run  On MacOS **10.14** you may need an additional step. Run 
Line 30: Line 35:
 where you may need to replace the string in the second command to the one that looks similar in the return of the first command. Then repeat the previous installer command. It should now succeed. where you may need to replace the string in the second command to the one that looks similar in the return of the first command. Then repeat the previous installer command. It should now succeed.
  
-The same problem may also occur on **10.15**. Contact us in this casewe don't yet know general solution.+On **10.15**, you should do 
 +<code> 
 +export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/ 
 +</code> 
 +and do all following steps in this terminal (or repeat the export commandif you open new one).
  
-=== Install Homebrew ===+==== Install Homebrew ====
  
 Installation instructions are [[https://brew.sh/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal. Make sure you copy the whole line! Installation instructions are [[https://brew.sh/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal. Make sure you copy the whole line!
  
-=== Install Perlbrew ===+==== Install Perlbrew ====
  
 Installation instructions are  [[https://perlbrew.pl/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal. Make sure you copy the whole line! Installation instructions are  [[https://perlbrew.pl/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal. Make sure you copy the whole line!
  
-Now add some paths to your Terminal config and reload the config:+Now add some paths to your Terminal config and reload the config. For versions prior to 10.15 do
 <code> <code>
 echo "export PERL5LIB=$HOME/perl5/lib/perl5:$HOME/perl5${PERL5LIB+:$PERL5LIB}" >> $HOME/.bash_profile echo "export PERL5LIB=$HOME/perl5/lib/perl5:$HOME/perl5${PERL5LIB+:$PERL5LIB}" >> $HOME/.bash_profile
Line 46: Line 55:
 echo 'export ARCHFLAGS="-arch x86_64"' >> $HOME/.bash_profile echo 'export ARCHFLAGS="-arch x86_64"' >> $HOME/.bash_profile
 source $HOME/.bash_profile source $HOME/.bash_profile
 +</code>
 +and for 10.15 do 
 +<code>
 +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
 </code> </code>
  
-=== Install dependencies with Homebrew ===+==== Install dependencies with Homebrew ====
  
 Run the collowing lines in your terminal: Run the collowing lines in your terminal:
Line 62: Line 78:
 </code> </code>
  
-=== Install dependencies with Perlbrew ===+==== Install dependencies with Perlbrew ====
  
 Run the following lines in your terminal: Run the following lines in your terminal:
Line 79: Line 95:
 </code> </code>
  
-=== Install a python dependence ===+==== Install a python dependence ====
  
 <code> <code>
 pip3 install jupyter --user pip3 install jupyter --user
 </code> </code>
 +This may complain about a path not beeing set. If so, add this to your $PATH-variable. 
  
-=== Download polymake ===+==== Download polymake ====
  
 You find the sources [[download:start|here]]. Get the source tarball from the Linux section of that page. Download to //Downloads//. You find the sources [[download:start|here]]. Get the source tarball from the Linux section of that page. Download to //Downloads//.
Line 95: Line 112:
 </code> </code>
  
-=== Configure and install polymake ===+==== Configure and install polymake ===
 + 
 +Essentially, polymake is compiled and installed with the following commands. This will put the polymake binary into ''/usr/local''.
  
 <code> <code>
Line 103: Line 122:
 </code> </code>
  
-=== Full script ===+However, we recommend to install into a directory in your $HOME-folder, in particular for MacOS 10.15. For this, create a folder with 
 +<code> 
 +mkdir $HOME/<polymake_install_folder> 
 +</code> 
 +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!) 
 + 
 +<code> 
 +cd ~/Downloads/polymake-4.0 
 +./configure --without-java --prefix=$HOME/<polymake_install_folder> 
 +ninja -C build/Opt -j2 install 
 +</code> 
 + 
 +You can then call ''polymake'' with 
 +<code> 
 +$HOME/<polymake_install_folder>/bin/polymake 
 +</code> 
 +or add ''$HOME/<polymake_install_folder>/bin/'' to your path. 
 + 
 +==== Full script ====
  
 [[https://gist.github.com/apaffenholz/a406c3d862f18345c56eddc21907808f|Here]] is also a script that does almost all these steps and allows some configuration. [[https://gist.github.com/apaffenholz/a406c3d862f18345c56eddc21907808f|Here]] is also a script that does almost all these steps and allows some configuration.
  • install/macos.txt
  • Last modified: 2024/04/11 16:57
  • by paffenholz