As ubuntu 22.04 LTS is shipped with an older version of python, and the current version of slm setup needs a newer version of python, when installing we get an error message of:
Python: 3.10.12 ✗ (3.11+ required)
Platform: Linux x86_64
RAM: 15.2 GB ✓
Data dir: [hidden]
sentence-transformers: ✗ (not installed)
Run: pip install 'sentence-transformers>=4.0.0'
✗ Python 3.11+ is required. Please upgrade Python.
It is better to have documentation to install slm within a python virtual environment.
One way of doing so on ubuntu is to rely on the deadsnakes repository:
# 1. Add the deadsnakes repository for newer Python versions
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
# 2. Install Python 3.12 and its virtual environment modules
sudo apt install python3.12 python3.12-venv python3.12-dev -y
# 3. Create the virtual environment folder named 'slm_env' in your home directory
cd ~
python3.12 -m venv slm_env
Then always start slm command within this python virtual environment by stepping into the virtual env:
source ~/slm_env/bin/activate
only within this environment, we could properly call slm doctor and update necessary dependencies, and eventually also start claude in a project folder only after activating this python environment. A bash file in the homefolder can help so that you can start claude from within the project folder, as when claude has started up, you can not change the working folder anymore:
example bash script to start the virtual environment and then start claude, to run within your project folder:
~/startclaude.sh
#!/bin/bash
# Force resolution of your profile variables
source ~/.bashrc
# Step into the SLM execution sandbox
source ~/slm_env/bin/activate
# Execute Claude and allow terminal interactive controls to persist
exec claude
To the author: it looks really nice to have superlocalmemory across sessions, on top of what claude has on built-in to the console via the markdown files. I'm curious what it wil bring when working with this a bit longer!
As ubuntu 22.04 LTS is shipped with an older version of python, and the current version of
slm setupneeds a newer version of python, when installing we get an error message of:It is better to have documentation to install slm within a python virtual environment.
One way of doing so on ubuntu is to rely on the deadsnakes repository:
Then always start slm command within this python virtual environment by stepping into the virtual env:
only within this environment, we could properly call
slm doctorand update necessary dependencies, and eventually also startclaudein a project folder only after activating this python environment. A bash file in the homefolder can help so that you can startclaudefrom within the project folder, as whenclaudehas started up, you can not change the working folder anymore:example bash script to start the virtual environment and then start claude, to run within your project folder:
~/startclaude.shTo the author: it looks really nice to have superlocalmemory across sessions, on top of what
claudehas on built-in to the console via the markdown files. I'm curious what it wil bring when working with this a bit longer!