Skip to content

Instantly share code, notes, and snippets.

@PEMessage
Created January 27, 2026 03:04
Show Gist options
  • Select an option

  • Save PEMessage/2797cb65f984b5ac692c9587f666991c to your computer and use it in GitHub Desktop.

Select an option

Save PEMessage/2797cb65f984b5ac692c9587f666991c to your computer and use it in GitHub Desktop.
Run ptghci in Ubuntu 24.04LTS
#!/bin/bash
# sudo apt-get install libzmq3-dev pkg-config
if [ ! -d .venv ] ; then
uv venv --python 3.8
source .venv/bin/activate
pip install pybits/requirements.txt
fi
source .venv/bin/activate
cd `uv python dir`/cpython-3.8.20-linux-x86_64-gnu/lib/
export LD_LIBRARY_PATH="$(readlink -f .):$LD_LIBRARY_PATH"
cd -
if command -v ptghci > /dev/null ; then
cd `uv python dir`/cpython-3.8.20-linux-x86_64-gnu/lib/pkgconfig
export PKG_CONFIG_PATH="$(readlink -f .):$PKG_CONFIG_PATH"
cd -
stack install
fi
ptghci "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment