Skip to content

installation with claude on ubuntu 22.04 LTS #32

@MelleKoning

Description

@MelleKoning

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions