# Python packages

The Sandbox IVM contains pre-installed Python packages. You can also install additional packages using the instructions below.

{% hint style="info" %}
FinnGen register data can be accessed in BigQuery using both [R](/working-in-the-sandbox/which-tools-are-available/miscellaneous-helper-scripts-tools/bigquery-connection-r.md) and [Python](/working-in-the-sandbox/which-tools-are-available/miscellaneous-helper-scripts-tools/tool-to-annotate-variants-with-rsids-1.md).
{% endhint %}

### Installed Python packages

You can list all installed Python packages using the following command:

`pip3 list`

To find if a specific Python package has been installed, please use the following command:

`pip3 show <package name>`

If the package has not been installed then the following warning message is shown:

`WARNING: Package(s) not found: <package name>`

### How to install new Python packages

You can install packages to your Sandbox IVM from a PyPI server installed within the Sandbox environment. It is not connected to the public internet and only contains packages added there by the Sandbox administrators. Your sandbox IVM has been pre-configured to access this PyPI server when you use the `pip3` (Python 3) or `pip2` (Python 2) command.

{% hint style="info" %}
You can ask for new packages to be added to the PyPI server by contacting the [Humgen service desk](mailto:humgen-servicedesk@helsinki.fi).
{% endhint %}

You can install a new package using the following command:

`pip3 install <package name>`

or

`pip2 install <package name>`

{% hint style="info" %}
It is also possible to install Python packages to [Python virtual environments](/working-in-the-sandbox/quirks-and-features/python-virtual-environment-in-sandbox.md) using the pip3 or pip2 command.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finngen.fi/working-in-the-sandbox/which-tools-are-available/python-packages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
