Unleashing AI Creativity: Installing the GPT-Engineer Package on Raspberry Pi

Ibrezm
2 min readAug 13, 2023
GPT Engineer at work — generated by Bing

The best thing about a boolean is even if you are wrong, you are only off by a bit.” — Anonymous and irrelevant proverb

Artificial intelligence (AI) is becoming an integral part of modern technology, enabling machines to perform tasks that previously seemed exclusive to human capabilities. With the GPT-Engineer package, you can bring AI-powered creativity to your Raspberry Pi projects. In this guide, we’ll walk you through the installation process of the GPT-Engineer package on a Raspberry Pi, including the prerequisite Rust installation.

Sometimes we think it going to be just as simple as pip install to install things.

python -m venv tvenv 
pip install gpt-engineer

But Life has seperate things in store for you :)

First up you will face the issue that Rust is not avaiable because it tries to compile and generate tiktoken.whl. when you try to install rust it defaults to aarch64 version which does not work correctly on raspberry pi.

copying tiktoken/py.typed -> build/lib.linux-aarch64-cpython-39/tiktoken
running build_ext
running build_rust
error: can't find Rust compiler If you are using an outdated pip version,
it is possible a prebuilt wheel is available for this package but pip is not able to install from it.
Installing from the wheel would avoid the need for a Rust compiler.

Error when trying to install rust and we get

(tvenv) test1@raspberrypi1:~/projects $ rustc
error: command failed: ‘rustc’: No such file or directory (os error 2)

To install rust correctly use the customize the rust installation and add

Change the default host triple from aarch64-unknown-linux-gnu

   default host triple: aarch64-unknown-linux-gnu
default toolchain: stable
profile: default
modify PATH variable: yes

To armv7-unknown-linux-gnueabihf

   default host triple: armv7-unknown-linux-gnueabihf
default toolchain: stable
profile: default
modify PATH variable: yes

Now try to reinstall

pip install gpt-engineer
sudo apt-get install libatlas-base-dev

gpt-engineer --help

It should work as a Charm. Also do not try to use APT to install rust it won’t work due to version issues. Do let me know if you need the tiktoken whl file I can upload and share so that you can circumnavigate the installation of rust itself.

Till next time.

--

--