Posted by on 18 June 2022

Here are the commands required to reproduce the environment for running solutions on an Apple device with an Apple Silicon processor.

The editor and language options available are:

VS code

Python, Julia, R, LaTex, Quarto markdown, Fortran, Wolfram

Jupyter Lab

Python, Julia, R, Wolfram, Octave, gnu plot, Quarto markdown

Pluto notebook

Julia

Octave

Octave

R Studio

R, Quarto markdown

wxMaxima

Maxima

These commands were entered on MacOS Monterey on a 24in iMac from 2021 but should work with any Apple Silicon chip device and other recent versions of MacOS.

install Monterey 12.4, VSCode 1.68, Julia 1.8.0-rc1, Rstudio 2022

From tug.org.mactex download and install MacTex.pkg

Add export PATH=”/usr/local/texlive/2022/bin/universal-darwin:$PATH” to ~/.zshrc file

sudo mkdir /usr/local/bin

sudo ln -s /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia  /usr/local/bin/julia18

In /users/YOURUSER/codes/Julia (or your chosen environments folder structure) julia18 -e ‘using Pkg; Pkg.generate(“learn”)’

cd learn

julia18 –project=.

install homebrew package manager

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

echo ‘eval “$(/opt/homebrew/bin/brew shellenv)”’ >> /Users/YOURUSER/.zprofile

eval “$(/opt/homebrew/bin/brew shellenv)”

brew install gcc

brew install fortran-language-server

In vscode added Python, Julia, Fortran Xavier Hahn, Fortran IntelliSense Chris Hansen, Fortran Breakpoint Support ekibun, LaTeX Workshop, REditor support, Quarto, Wolfram Research extensions

In the relevant extension settings add the path to the language servers

Julia: Executable Path /usr/local/bin/julia18

Fortran-ls: Executable Path /usr/local/bin/fortls

Wolfram: Kernel Path /Applications/Wolfram Engine.app/Contents/MacOS/WolframKernel

From quarto.org download and install the program to install the Quarto CLI

From https://github.com/conda-forge/miniforge downloaded Miniforge3-MacOSX-arm64.sh

In Terminal  cd Downloads 

bash Miniforge3-MacOSX-arm64.sh Enters yes Enter yes

Close terminal and re enter

conda config –set auto_activate_base false

Close terminal and re enter

a3105 is the chosen environment naming convention a – Apple Silicon and 3105 for the python version

conda create -n a3105 python=3.10.5

conda activate a3105

which python shows /Users/YOURUSER/miniforge3/envs/a3105/bin/python

python -V shows Python 3.10.5

which pip shows /Users/YOURUSER/miniforge3/envs/a3105/bin/pip

Ensure your terminal indicates that you are in the activated environment (a3105) appears on command line prompt, Then:

conda install -c conda-forge jupyterlab

conda install -c conda-forge numpy

conda install -c conda-forge sympy

conda install -c conda-forge matplotlib

conda install -c conda-forge pandas

conda install -c conda-forge plotly

conda install -c conda-forge bokeh

conda install -c conda-forge scipy

conda install -c conda-forge seaborn

conda install -c conda-forge ipympl

conda install -c conda-forge watermark

conda install -c conda-forge stochastic

pip install octave-kernel gnuplot-kernel 

brew install r

Enter next command as a capital

R

install.packages(‘IRkernel’)

choose 70 UK

install.packages(‘plotly’)

install.packages(‘languageserver’)

install.packages(‘rmarkdown’)

IRkernel::installspec()

quit()

From nodejs.org other downloads nodejs .pkg for 64-bit-ARM64 18.4.0, Run package install from Downloads

jupyter labextension list

jupyter kernelspec list

jupyter nbextension list

mv .jupyter miniforge3/envs/a3105

add to .zshrc:

export JUPYTER_CONFIG_DIR=~/miniforge3/envs/a3105

From https://www.wolfram.com/engine/

Downloaded Wolfram Engine for Developers macOS 

In Downloads executed dmg WolframEngine_13.0.1_MAC_EXP.dmg

2 steps drag Wolfram Engine to Applications and Install script from package

In Applications run Wolframscript – enter wolfram login credentials

PacletInstall[“CodeParser”]

PacletInstall[“CodeInspector”]

PacletInstall[“CodeFormatter”]

PacletInstall[“LSPServer”]

git clone https://github.com/WolframResearch/WolframLanguageForJupyter.git

cd Documents/GitHub/WolframLanguageForJupyter/ (OR your GIT folder)

./configure-jupyter.wls add

add to .zshrc:

export WOLFRAMSCRIPT_KERNELPATH=/Applications/Wolfram\ Engine.app/Contents/MacOS/WolframKernel

Using Julia18 add IJulia package

julia18

]

add IJulia

Delete Key

exit()

python -m gnuplot_kernel install – -user

brew install octave

brew install maxima wxmaxima

octave –gui to run Octave

jupyter-lab to run jupyter

Posted in: Uncategorised