---
# System prepended metadata

title: NumPy setup from scratch

---

# NumPy setup from scratch

## Install packages

Basic packages
```
apt update && apt upgrade
apt install git
apt install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt install python3.11
apt-get install python3.11-dev
apt install cmake
apt install libblas-dev liblapack-dev libopenblas-dev pkg-config
```

Verify python
```
python3.11
```

Python stuff
```
apt install python-pip
apt install python3.11-venv
python3.11 -m venv env
source env/bin/activate
```

Download code base
```
git clone ...
```

NumPy Requirements
```
python -m pip install -r test_requirements.txt
apt install meson
python3 -m pip install -r build_requirements.txt
python3 -m pip install ipython
git submodule update --init
```

## Build NumPy
Build
```
spin build
```

Verify
```
spin python -c "import numpy as np; print(np.__version__)"
```

## Debuging
```
apt install gdb
```

```
spin gdb -c ''
```