# Creating a Mitosheet

{% hint style="warning" %}
Before creating a Mitosheet, make sure [you've installed Mito](https://docs.trymito.io/getting-started/installing-mito). If you just installed Mito, **make sure to restart your kernel + refresh your browser.**
{% endhint %}

### Create a new mitosheet

1. Open the Notebook where you want to create the mitosheet. If you installed Mito in a virutal environment, make sure to [launch the notebook from the same virtual environment](https://docs.trymito.io/how-to/creating-a-mitosheet/open-existing-virtual-environments).&#x20;
2. Copy and paste this code into a cell:

```python
import mitosheet
mitosheet.sheet()
```

3. Run the code by clicking on the code cell that contains it and pressing **Shift + Enter**.
4. Follow the instructions to [import data into Mito](https://docs.trymito.io/how-to/importing-data-to-mito).

### Reopen an existing mitosheet

If you've already created a mitosheet that you want to continue working from:

1. Open the Notebook where you previously created the mitosheet. If you installed Mito in a virutal environment, make sure to [launch the notebook from the same virtual environment](https://docs.trymito.io/how-to/creating-a-mitosheet/open-existing-virtual-environments).&#x20;
2. Click on the code cell that contains the `mitosheet.sheet(...)` call that you want to reload, and press **Shift+Enter**.

If you want to learn more about reopening an existing mitosheet, read [this section](https://docs.trymito.io/overview-of-the-mitosheet#rerunning-an-analysis) of the Core Concepts overview. &#x20;

### Common Errors

#### First time creating a mitosheet

If this is the first mitosheet you are creating after installing Mito, view these [common install errors](https://docs.trymito.io/getting-started/installing-mito/common-install-errors).

#### ModuleNotFoundError

<figure><img src="https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2FeJzhjr67gf6EKgkGDZJJ%2FScreenshot%202023-09-26%20at%202.02.39%20PM.png?alt=media&#x26;token=e7bb8f10-4861-4532-8b56-76f7aff7fc65" alt=""><figcaption></figcaption></figure>

If you've previously created a mitosheet, and you see this **ModuleNotFoundError** after running the above code, its likely because the mitosheet package is not installed in your current environment.&#x20;

Make sure to launch [launch the notebook from the same virtual environment](https://docs.trymito.io/how-to/creating-a-mitosheet/open-existing-virtual-environments) that you installed Mito in.&#x20;

**NameError**

<figure><img src="https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2FgTnW934T52bwWJV6T1Ew%2FScreenshot%202023-09-26%20at%202.02.52%20PM.png?alt=media&#x26;token=4b68e5f1-edbf-4b39-b35b-441b2404a625" alt=""><figcaption></figcaption></figure>

If after running the `mitosheet.sheet()` code, you see this **NameError**, you have to first import the mitosheet package.&#x20;

1. Copy this code into your notebook above the `mitosheet.sheet()` call

```
import mitosheet
```

2. Click on the `import mitosheet` code and press **Shift + Enter**&#x20;
3. Click on the `mitosheet.sheet()` code and press **Shift + Enter**

{% hint style="info" %}
Want help? Get in contact with our support team through [Discord](https://discord.gg/XdJSZyejJU), [Slack](https://join.slack.com/t/trymito/shared_invite/zt-1h6t163v7-xLPudO7pjQNKccXz7h7GSg), or by emailing <jake@sagacollab.com>
{% endhint %}
