# Preinstalled libraries and adding your own

[Workspaces](/glossary/workspace) come with the scientific Python stack already installed. Check what you have before
installing anything:

```python
import numpy, pandas, scipy, sklearn, torch
for m in (numpy, pandas, scipy, sklearn, torch):
    print(f"{m.__name__:12s} {m.__version__}")
```

## What is included

NumPy, pandas, SciPy, scikit-learn, and PyTorch, plus common geospatial and imaging libraries.
Between them these cover most data analysis, scientific computing, and model training work.

Runtime is Python 3.12.

## What is not supported

:::warning
Eugo does not support **TensorFlow**, **spaCy**, or **JAX**.
:::

This is the constraint most likely to derail a migration, so establish it early. If a pipeline depends
on one of them, that dependency needs replacing before the rest of the move is worth planning.
PyTorch is the supported path for deep learning work.

## Adding a package

```python
%pip install some-package
```

`%pip` rather than `!pip`: the magic installs into the kernel actually running your [notebook](/glossary/notebook), whereas
the shell version can install into a different interpreter and leave you with a package that imports
in the terminal but not the notebook.

## Session-scoped versus workspace-scoped

Installing from a notebook affects that environment. For something the whole team needs, install into
the **workspace** so it persists and everyone shares it.

If each person installs into their own session instead, every new session pays the setup cost, and
environments quietly diverge until someone's code works and someone else's does not.

## Workers need it too

A package your [task](/glossary/task) body imports must be available on the **compute nodes**, not only in your session.
Workspace-level installation covers both. A session-only install does not, which produces an
`ImportError` inside a task while the same import succeeds in the notebook.

## Pin what matters

For reproducible work, record versions:

```python
%pip freeze > /workspace/requirements-lock.txt
```

Keep that file in version control alongside the code. "It worked in August" is not a recoverable state
without it.

---

Source: https://university.eugo.io/lesson/eugoide-essentials/preinstalled-libraries
