Starter environments
First launch creates two read-only conda environments in ~/.claude-science:- Python: numpy, pandas, scipy, matplotlib, seaborn, pillow
- R: tidyverse, ggplot2, jsonlite
Task environments
When work needs packages the starters don’t have, Claude reuses an existing named environment or proposes creating a new one (for example, single-cell or structural-biology). A permission card shows the environment name and initial packages. Environments are shared across all projects on the machine. To list or delete environments, ask Claude; there’s no settings page for them.Installing packages
Claude installs from these sources by default:- Conda: micromamba from the conda-forge, bioconda, defaults, and pytorch channels
- Python: pip from PyPI
- R: CRAN and Bioconductor
pip install or install.packages()) lasts only until the kernel restarts. To keep a package, ask Claude to install it into the environment. For a Python package Claude can’t install there with pip, see Python package sources for starter and task environments.
For tools without a package, Claude downloads source, builds it in the sandbox with compilers from conda-forge, and saves the build as an artifact for reuse.
The sandbox has no root access or system package manager. apt and sudo aren’t available; Claude uses conda-forge or builds from source instead.
Python package sources for starter and task environments
When Claude uses pip to install a Python package into a starter or task environment, it installs only prebuilt packages (wheels) from PyPI or, if one is set up, your internal mirror. It doesn’t install a package from a git repository, a web address, a local folder, or a local file. If the package, or a package it depends on, has no wheel for your computer and Python version, the install fails. That includes a package published only as source code. In a Windows starter environment, if only a dependency has no wheel, the package installs without any of its dependencies. Ask Claude to install the others by name. When the newest version of a package has no wheel for your computer and Python version but an older version does, pip installs the older version. To find out which version you have, ask Claude. If you need the newest version, use one of the ways below. To use a package Claude can’t install this way, ask Claude to install it into the environment with conda if conda-forge has it. On macOS and Linux, starter environments refuse some conda packages, such as sphinx and some tensorflow builds, so have Claude install those into a task environment. If conda-forge doesn’t have the package, ask Claude to install it with pip in a code cell, where it lasts only until the kernel restarts.Environments in granted folders
Code Claude runs can read granted folders but can’t change anything in them, including Python and conda environments from any tool, with exceptions on Windows (see Sandbox). Claude can run code from an environment there unless its Python is somewhere the sandbox can’t read, such as~/.local/share/uv. Claude can’t create environments there or change their packages.
On Linux, pip, uv, and pixi fail with Read-only file system, and conda with EnvironmentNotWritableError. In a uv project, uv run and uv sync fail the same way whenever they have to update the environment, for example after pyproject.toml changes. To skip that update, ask Claude to use uv run --no-sync.
To add packages, choose one of these:
- Ask Claude to use a task environment instead. Packages installed there stay available in every session and project that uses it.
- In a uv project, ask Claude to use a separate environment. Have Claude set
UV_PROJECT_ENVIRONMENTto the full path of a folder in the session’s workspace folder and install packages there withuv pip install --python. The variable must stay set for later uv commands, includinguv run.uv addanduv removestill fail because they change project files, anduv runcan fail in projects that build with setuptools. The separate environment belongs to that session, so another session starts without it. It’s cleared with the workspace folder (see A file that Claude made is gone). For a change every session keeps, change the environment yourself in a terminal outside Claude Science. - Change the environment yourself. In a terminal outside Claude Science, use the tool’s own commands to add, update, or remove packages.
GPUs
If your Linux machine has NVIDIA GPUs, the sandbox makes them available to code Claude runs, including on multi-GPU machines. To use them, turn on the Host GPU switch in Settings > Compute. Sessions you start after that can use the GPU. A session started while the switch was off keeps running without it, and so does a session continued from it with Continue as a new session.Turning on the Host GPU switch reduces the default sandboxing configuration applied by Claude Science. Code in GPU sessions uses your graphics driver directly.
How Claude Science detects a GPU
On Linux, Claude Science detects an NVIDIA GPU by runningnvidia-smi. When it finds no GPU this way, Claude treats the machine as having no GPU, and the Host GPU switch doesn’t appear in Settings > Compute unless it’s already on.
Claude Science runs the first nvidia-smi it finds in these folders, in this order:
/usr/local/nvidia/bin/usr/bin/bin/usr/lib/wsl/lib/opt/bin
command -v nvidia-smi in a terminal outside Claude Science. Claude Science doesn’t look for nvidia-smi in any other folder, such as /usr/local/bin. If the nvidia-smi in a listed folder is a link, the file it finally leads to, after any other links, must also be named nvidia-smi and be under /usr, /lib, /lib64, /bin, /sbin, or /opt. To see the file a link finally leads to, run readlink -f with its path, for example readlink -f /usr/bin/nvidia-smi.
nvidia-smi also has to work without the LD_LIBRARY_PATH environment variable, because Claude Science doesn’t pass that variable on to it, even when your terminal has it set. To check, run it in a terminal outside Claude Science by its full path with the variable removed, for example env -u LD_LIBRARY_PATH /usr/bin/nvidia-smi. If that fails where plain nvidia-smi works, the variable is the reason. Make nvidia-smi work without the variable, or ask your system administrator to.
If nvidia-smi is in another folder, link it into /usr/bin, which takes administrator (sudo) access. If you don’t have that access, ask your system administrator to make the link. For example, when nvidia-smi is in /usr/local/bin, run this in a terminal outside Claude Science:
claude-science stop in a terminal outside Claude Science and start Claude Science again. If Claude Science then finds the GPU, the Host GPU switch is in Settings > Compute and its label shows the GPU’s name. Turn it on if it’s off, then start a new session, not one made with Continue as a new session.