Skip to content

Conversation

@awilliamson
Copy link

Python constraint (<3.12) & gymnasium package added to Pyproject.toml. Updated the readme to include more detailed setup and build instructions including build dependencies and procedures.

Fixes #19

Added missing Gymnasium project dependency, and tighter constraints on
Python version. See drubinstein#19
Specific instructions around build-essentials required for compiling
from dependencies from source. Clarified supported Python. More detailed
instructions on installation and setup.
@Kking112
Copy link
Contributor

Kking112 commented Dec 2, 2025

This should be merged imo. I tried using Python 3.12 & 3.13 at first, and can concur that it causes issues. Python 3.11.12 worked for me.

Comment on lines +23 to +81
#### 🐧 Ubuntu / Debian

You will need to add a PPA for Python versions which are not the latest and update your package list before being able to install Python3.10/Python3.11.

```bash
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11-dev build-essential
```

> Replace `python3.11-dev` with the appropriate version for your system if using a different Python version. E.g Python3.10

#### 🐧 Arch Linux / Manjaro

Arch Linux provides only the latest version of Python, so you must use the **AUR** (Arch User Repository) to install Python 3.10/Python 3.11.

Install an AUR helper like `yay` if you haven’t already:

```bash
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
```

Install the aur package [Python 3.11](https://aur.archlinux.org/packages/python311)
```bash
yay -S python311
```
---

### 🔧 Fix: antlr4-python3-runtime Build Issues

Before installing, **upgrade `pip` and `setuptools`** to avoid errors when building some dependencies (like `antlr4-python3-runtime`):

```bash
pip install --upgrade pip setuptools
```

This resolves errors such as:

```
AttributeError: install_layout. Did you mean: 'install_platlib'?
```

> ⚠️ You may still see a warning about `setup.py install` being deprecated — this can usually be ignored if installation completes.

---

### 🐍 (Optional) Virtual Environment Setup & Sourcing

Creating a virtual environment helps isolate dependencies, and prevent system-wide conflicts. The following will create a folder `.venv` for your dependencies. You should source this everytime.

```bash
python3 -m venv .venv
source .venv/bin/activate
```

Ensure `python3` points to Python 3.11 or earlier.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this. I'd rather the instructions simply point to uv

"websockets"
]
requires-python = ">= 3.10"
requires-python = ">= 3.10, < 3.12"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you make a pr with just this one line, I'll take it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do this now, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pip install Error - Python 3.12

3 participants