installs

The configuration commands for a working environment are:

2024

A blog about Apple Hardware Old and New

I have spent a lot of money on the latest Apple M4 iPad. Why can’t it run MacOS? Oh to make sure I buy both expensive products!

As I can do everything on the iPad except coding what other options are there?

The £35 UK option:

2008 MacBook Pro 15 inch

Picture of MacBook 15 inch from 2008.

MacBookPro15

I got this from eBay for UK £25. Surely just the aluminium cost that. We are at the point where all the early plastic laptops are deteriorating but the metal ones should last longer.

The exact specs of the machine I got are everymac

My one has 8GB RAM. I worked backwards from Sonoma using Open Core Legacy Patcher to find I could get MacOS Monterey to work on it.

On Monterey I can access my icloud documents and take notes in Obsidian etc but the latest versions of Pages and Numbers etc are blocked from loading by Apple. But they are on my expensive iPad so I only need this to code.

I like the Raspberry Pi OS as it is familiar from using their products so I decided to make this a dual boot of Linux and Monterey.

This is how I did it…

The editor and language options available are:

VS code

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

Jupyter Lab

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

Pluto notebook

Julia

Octave

Octave

R Studio

R, Quarto markdown

wxMaxima

Maxima

These commands were entered on an M3 Mac running MacOS Sonoma 14.1.1 but will be applicable to other Apple Silicon models and OS versions

install VSCode 1.87.2, Julia 1.10.2

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

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

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 extensions

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

Julia: Executable Path /Applications/Julia-1.10/Contents/Resources/julia/bin/julia

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

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

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

a31011 is the chosen environment naming convention a – Apple Silicon and 31011 for the python version

conda create -n a31011 python=3.10.11

conda activate a31011

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

python -V shows Python 3.10.11

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

Ensure your terminal indicates that you are in the activated environment (a31011) 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,itables

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

conda install -c conda-forge lfortran

conda install -c conda-forge astropy plasmapy

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 21.7.1, Run package install from Downloads

jupyter labextension list

jupyter kernelspec list

jupyter nbextension list

mv .jupyter miniforge3/envs/a31011

add to .zshrc:

export JUPYTER_CONFIG_DIR=~/miniforge3/envs/a31011

Using Julia add IJulia package

julia app

]

add IJulia

Delete Key

exit()

python -m gnuplot_kernel install – -user

brew install octave

brew install scilab

brew install maxima wxmaxima

octave –gui to run Octave

jupyter-lab to run jupyter

The editor and language options available are:

VS code

Python, Julia, R

Jupyter Lab

Python, Julia, R, Octave, gnu plot

Pluto notebook

Julia

Octave

Octave

These commands were entered on an M1 Mac running Ubuntu 23.10 in a Virtual Machine in Parallels but the commands should apply to other Ubuntu systems

uname -a shows 6.5.0-26

mkdir tmp

cd tmp

wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz

zcat install-tl-*

sudo perl ./install-tl –no-interaction

add to .bashrc

export MANPATH=”/usr/local/texlive/2022/texmf-dist/doc/man:$MANPATH”

export INFOPATH=”/usr/local/texlive/2022/texmf-dist/doc/info:$INFOPATH”

export PATH=”/usr/local/texlive/2022/bin/aarch64-linux:$PATH”

mkdir Developer

cd Developer

sudo apt update

From https://github.com/conda-forge/miniforge downloaded Miniforge3-Linux-aarch64 (x86 if not on ARM)

In terminal in Downaloads bash Miniforge3-Linux-aarch64.sh (x86 if not on arm)

Chose to Initialise miniforge3

Restart Terminal

Environment structure is u-ubuntu 31011 – python version

conda create -n u31011 python=3.10.11

conda activate u31011

which python shows /home/parallels/miniforge3/envs/u31011/bin/python (Note where yours is)

python -V shows Python 3.10.11

which pip shows /home/parallels/miniforge3/envs/u31011/bin/pip

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,itables

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

conda install -c conda-forge lfortran

conda install -c conda-forge astropy plasmapy

conda install -c conda-forge r-base

From julialang.org/downloads downloaded 64bit AArch64 of v1.10.2

cd Downloads

gunzip julia-1.10.2-rc1-linux-aarch64.tar.gz

sudo mkdir /usr/local/bin/julia110

sudo tar -xvf julia-1.10.2.linux-aarch64.tar -C /usr/local/bin/julia110

Change /home/parallels for where yours is

ln -s /usr/local/bin/julia110/julia-1.10.2/bin/julia /home/parallels/miniforge3/envs/u31011/bin/julia110

julia110

using Pkg

Pkg.add(“IJulia”)

exit()

In your chosen environment folder structure:

julia110 -e ’using Pkg;Pkg.generate(“learn”)

cd learn

julia110 –project=.

add environment specific Julia packages

From https://nodes.org/en/downloads/current downloaded Linux binaries ARMv8

sudo mkdir /usr/local/bin/node

sudo tar -xvf node-v16.15.1-linux-arm64.tar.xz -C /usr/local/bin/node

Extract files from node-v16.15.1-linux-arm64.tar.xz to /home/parallels/node-v16.8.0

ln -s /usr/local/bin/node/node-v16.15.1-linux-arm64/bin/node /home/parallels/miniforge3/envs/u3105/bin/node

R

install.packages(‘IRkernel’)

Selected Bristol mirror

install.packages(‘plotly’)

IRkernel::installspec()

quit()

pip install octave-kernel

sudo apt-get install octave

pip install gnuplot_kernel

python -m gnuplot_kernel install –user

jupyter-lab build

jupyter labextension list

jupyter kernelspec list

jupyter nbextension list

jupyter-lab Verify working with test notebook Then shutdown

sudo apt install fortran-language-server

From quarto.org download Quarto CLI amd64 package

From code.visualstudio.com/download download 64 bit .deb package (arm64 if on Apple Silicon)

sudo apt install ./code_1.68.1…

code

Install Python, Julia, Fortran Xavier Hahn, Fortan IntelliSense, Fortran Breakpoint Support ekibun LaTex Workshop, Quarto,

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

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

Here are the commands required to reproduce the environment for running solutions on a Raspberry Pi Single Board Computer

The editor and language options available are:

VS Code

Python, Julia, R, Wolfram

Jupyter Lab

Python, Julia, R, Wolfram, Octave SciLab

Pluto notebook

Julia

Octave

Octave

wxMaxima

Maxima

These commands were entered on Raspberry Pi OS Buster 64bit on a 4GB Raspberry Pi

From https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2021-05-28/ downloaded 2021-05-07-raspios-buster-arm64.zip

Flashed to 32GB sd card with Balena Etcher

Booted on RPI4

Tick use English language Next

New password Next

Set Up Screen tick this screen shows a black border Next

Select wifi network Skip (cabled)

Update software Skip

Setup Complete Restart

Raspberry > Preferences > Raspberry Pi Configuration> Interfaces enable SSH and VNC

In terminal

sudo apt-get update

sudo apt-get full-upgrade

sudo reboot

mkdir Developer

sudo apt-get update

sudo apt-get install wolfram-engine

From https://github.com/conda-forge/miniforge downloaded Miniforge3-Linux-aarch64

In terminal in Downaloads bash Miniforge3-Linux-aarch64.sh

Chose to Initialise miniforge3

Restart Terminal

conda create -n rp395 python=3.9.5

conda activate rp395

which python shows /home/pi/miniforge3/envs/rp395/bin/python

python -V shows Python 3.9.5

which pip shows /home/pi/miniforge3/envs/rp395/bin/pip

pip install jupyterlab

conda install -c conda-forge vtk

ONE AT A TIME if crashes

pip install numpy sympy matplotlib pandas plotly bokeh scipy seaborn statsmodels octave-kernel ipympl ipyvtklink vispy jupyter_rfb vpython pyvista QtPy scilab-kernel

pip install watermark ipywidgets

sudo apt-get install octave

sudo apt-get install scilab

pip install gnuplot_kernel

python -m gnuplot_kernel install – -user

From julialang.org/downloads downloaded 64bit AArch64 of v1.6.2

Unzipped tar to /home/pi/julia-1.6.2

ln -s /home/pi/julia-1.6.2/bin/julia /home/pi/miniforge3/envs/rp395/bin/julia

julia

using Pkg

Pkg.add(“IJulia”)

Pkg.add(“Plots”)

Pkg.add(“DifferentialEquations”)

Pkg.add(“StaticArrays”)

Pkg.add(“BoundaryValueDiffEq”)

Pkg.add(“OrdinaryDiffEq”)

Pkg.add(“Sundials”)

Pkg.add(“SciMLBase”)

Pkg.add(“Plotly”)

Pkg.add(“PlotlyBase”)

exit()

From https://nodes.org/en/downloads/current downloaded Linux binaries ARMv8

Extract files from node-v16.8.0-Linux-arm64.tar.xz to /home/pi/node-v16.8.0

ln -s /home/pi/node-v16.8/bin/node /home/pi/miniforge3/envs/rp395/bin/node

From github.com/WolframResearch/WolframLanguageForJupyter.git downloaded WolframLanguageForJupyter-master.zip

Unzipped to home/pi/wolfram

In p395 environment in Wolfram directory created

./configure-jupyter.wls add

sudo apt-get purge dillo

sudo apt install r-base r-base-core r-base-dev

R

install.packages(‘IRkernel’)

yes

yes

IRkernel::installspec()

quit()

n

sudo apt install code

code

Add Python, Julia, REditor support extensions

jupyter-lab build

jupyter labextension list

jupyter kernelspec list

jupyter nbextension list

jupyter-lab Verify working with test notebook Then shutdown

jupyter notebook –generate-config

jupyter notebook password

In rp395 Julia add Pluto, import Pluto, Pluto.run(host=“=0.0.0.0”)