Sitemap
Ash Noor

Ash Noor

I use storytelling techniques to make complex technology easier to understand. I accomplish this via: How-To Guides. Allegorical stories.

Step-by-Step Guide: Installing Python Venv and pip on an ARM64 Ubuntu VM on macOS.

2 min read11 hours ago
Press enter or click to view image in full size
Setting up a Python virtual environment and bootstrapping pip on an ARM64 Ubuntu VM running on Apple Silicon macOS.

Hello learners,
In this post I will show you how to fix Python Venv and Pip installation on an ARM64 Ubuntu VM on macOS (VirtualBox).

I am currently building out my lab for the AI Hacking course from TCM Security. In this lab, we spin up an Ubuntu virtual machine, I set mine up using VirtualBox.

Since I’m running an Apple Silicon M-series machine (ARM64 host), I’ve had to figure out some workaround solutions to get specific tools and dependencies running properly inside the Linux guest environment.

My most recent hurdle was setting up a clean Python virtual environment to successfully pip install the requirements.txt file for an AI mapping tool we are using.

Due to the ARM64 architecture constraints on the Ubuntu VM, standard installation methods kept throwing errors. After digging through documentation and troubleshooting the roadblocks, I finally got everything running smoothly.

If you are running an ARM64 Ubuntu VM on macOS and struggling with Python virtual environments or missing pip packages, here are the step-by-step commands that worked for me to get up and running:

Installing Python Venv and pip on an ARM64 Ubuntu VM on macOS.
Create a python environment without pip:
sudo python3.12 -m venv .venv — without-pip

Get Ash Noor’s stories in your inbox

Join Medium for free to get updates from this writer.

Grant ownership to your current user:
sudo chown -R $USER:$USER .venv

Check the ownership transfer was successful:
ls -la .venv

Activate the environment:
source .venv/bin/activate

Download pip from bootstrap:
curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Install pip:
python get-pip.py

Verify installation:
pip — version

Install your requirements:
pip install -r requirements.txt

I hope that solutions worked for you as it did for me.
Feel free to comment below if this worked or if you had to do anything different so that we can all learn together.

See you in the next post.
Thanks for reading.
Ash Noor | Tech Storyteller at Myth & Matrix.

--

--

Ash Noor
Ash Noor

Written by Ash Noor

I use storytelling techniques to make complex technology easier to understand. I accomplish this via: How-To Guides. Allegorical stories.