Export utilities and notebooks for Tolias Lab mouse Neuropixels data.
Built around a minimal, portable uv setup.
# Linux, macOS, or WSL
curl -Ls https://astral.sh/uv/install.sh | sh
exec $SHELL -l # reload your shell
uv --version# Windows (Powershell)
irm https://astral.sh/uv/install.ps1 | iex
# open a new PowerShell window
uv --version# Linux, macOS, or WSL
git clone https://github.com/atlab/mouse-neuropixel-export.git
cd mouse-neuropixel-exportuv sync --frozenThis will:
- Ensure a Python interpreter matching the version specified in the pyproject.toml
- Create a local virtual environment at
.venv/ - Install dependencies defined in
pyproject.tomlanduv.lock
The --frozen flag ensures that dependencies are installed exactly as specified in uv.lock
(it will fail if the lockfile and pyproject.toml are out of sync).
Option a. Without additional configuration:
# Linux, macOS, or WSL, Windows
uv run jupyter labOption b. Ad-hoc (override port, etc.):
# Linux, macOS, or WSL, Windows
uv run jupyter lab --port 8890 --no-browserOption c. With a custom config file:
# Linux, macOS, or WSL, Windows
uv run jupyter lab --config .jupyter/jupyter_server_config.pyTo see how to generate this file and/or add a password see Additional configuration section below.
The terminal will display connection information, including the access URL for your JupyterLab session. Open that URL in a web browser (or use the configured hostname, port, and credentials if running remotely).
- Make sure you've run
uv sync --frozen - Open a
.ipynbJupyter notebook - Select the kernel named
Python (mouse-neuropixel-export)or similar - Run cells as usual.
VS Code will automatically use the environment created by uv.
Create a repo-local Jupyter config.
# Linux, macOS, WSL
JUPYTER_CONFIG_DIR=./.jupyter jupyter server --generate-config# Windows Powershell
$env:JUPYTER_CONFIG_DIR = ".\.jupyter"
jupyter server --generate-config
Remove-Item Env:JUPYTER_CONFIG_DIRNote: The generator won’t overwrite an existing file. Delete or rename an older config if you want a fresh template.
# Linux, macOS, or WSL, Windows
uv run jupyter lab --config .jupyter/jupyter_server_config.pySet a password directly in the Python config file (.jupyter/jupyter_server_config.py)
# Linux, macOS, WSL, Windows
uv run python -c "from jupyter_server.auth import passwd; print(passwd())"c.PasswordIdentityProvider.hashed_password = <paste string here># Linux, macOS, or WSL, Windows
uv run jupyter lab --config .jupyter/jupyter_server_config.pySome shared or remote filesystems do not allow symbolic links, which uv uses
to link its managed Python interpreter into the project’s virtual environment.
If you see an error such as:
error: failed to symlink file ... Operation not supported (os error 95)
Create the environment in a local path instead:
# Linux, macOS, or WSL
export UV_PROJECT_ENVIRONMENT="$HOME/.venvs/mouse-neuropixel-export"
uv sync --frozen# Windows (Powershell)
$env:UV_PROJECT_ENVIRONMENT = "$HOME\.venvs\mouse-neuropixel-export"
uv sync --frozenYour project code can still reside on the shared mount.
© 2025 Tolias Lab. MIT License.