> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ns.rocks/llms.txt
> Use this file to discover all available pages before exploring further.

# Pre-installed libraries

> Python data, ML, plotting, and notebook packages included in the standard code-interpreter template.

The standard `code-interpreter` template starts from Python 3.12 and includes
common data analysis, visualization, scraping, and ML packages.

## Python Packages

```text theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
numpy
pandas
matplotlib
seaborn
plotly
scipy
scikit-learn
pillow
requests
beautifulsoup4
nltk
opencv-python-headless
xgboost
```

Notebook/runtime packages include `ipykernel`, `jupyter_client`, and
`bash_kernel`.

## Install More Packages

<CodeGroup>
  ```python Python SDK theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
  machine.install_packages(["humanize==4.9.0"])
  result = machine.run_code("""
  import humanize
  print(humanize.intword(1234567))
  """)
  print("".join(result.logs.stdout))
  ```

  ```bash CLI theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
  nullspace machine code install mch_123 humanize==4.9.0
  nullspace machine code run mch_123 "import humanize
  print(humanize.intword(1234567))"
  ```

  ```bash HTTP API theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
  # install_packages runs a pip command through the code interpreter
  # returns a Server-Sent Events stream of JSON events
  curl -N -X POST "${NULLSPACE_API_URL}/v1/machines/mch_123/code/execute" \
    -H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{"code": "!pip install humanize==4.9.0"}'
  curl -N -X POST "${NULLSPACE_API_URL}/v1/machines/mch_123/code/execute" \
    -H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{"code": "import humanize\nprint(humanize.intword(1234567))"}'
  ```
</CodeGroup>

Package installs affect the running machine. Build a custom template when a
dependency should be preinstalled for many machines.

## Related

* [Analyze data with AI](./analyze-data)
* [Templates](../templates/overview)
