---
title: Setup for Linux via pip
sidebarTitle: pip on Linux
---

<Tip>
To successfully install MindsDB, use **Python 64-bit version**. Also, make sure that **Python >= 3.10** and **pip >= 20.3**.
</Tip>

## Installation using the Python [`venv`](https://docs.python.org/3/library/venv.html) Module

1. Create a new virtual environment called `mindsdb`:

   ```bash
   python -m venv mindsdb
   ```

   Now, activate it:

   ```bash
   source mindsdb/bin/activate
   ```

2. Once inside the virtual environment, run the command below to mitigate the
   dependency issues:

   ```bash
   pip install --upgrade pip setuptools wheel
   ```

3. Install MindsDB:

   ```bash
   pip install mindsdb
   ```

4. Start MindsDB:

   ```bash
   python -m mindsdb
   ```
   
   <Tip>
   By default, MindsDB starts the `http` and `mysql` APIs. You can define which APIs to start using the `api` flag as below.

   ```bash
   python -m mindsdb --api http,mysql,postgres
   ```

   If you want to start MindsDB without the graphical user interface (GUI), use the `--no_studio` flag as below.

   ```bash
   python -m mindsdb --no_studio
   ```
   </Tip>

## Installation using Anaconda

Here, you need either [Anaconda](https://www.anaconda.com/products/individual)
or [Conda](https://conda.io/projects/conda/en/latest/index.html) installed on
your machine.

1. Open Anaconda prompt and create a new virtual environment:

   ```bash
   conda create -n mindsdb
   ```

   Now, activate it:

   ```bash
   conda activate mindsdb
   ```

2. Once inside the virtual environment, run the command below to mitigate the
   dependency issues:

   ```bash
   pip install --upgrade pip setuptools wheel
   ```

3. Install MindsDB:

   ```bash
   pip install mindsdb
   ```

4. Start MindsDB:

   ```bash
   python -m mindsdb
   ```
   
   <Tip>
   By default, MindsDB starts the `http` and `mysql` APIs. You can define which APIs to start using the `api` flag as below.

   ```bash
   python -m mindsdb --api http,mysql,postgres
   ```

   If you want to start MindsDB without the graphical user interface (GUI), use the `--no_studio` flag as below.

   ```bash
   python -m mindsdb --no_studio
   ```
   </Tip>

## Dependencies

The dependencies for many of the data or ML integrations are not installed by default.

If you want to use a data or ML integration whose dependencies are not available by default, install it by running this command:

```
pip install mindsdb[handler_name]
```

<Tip>
You can find all available [handlers here](https://github.com/mindsdb/mindsdb/tree/main/mindsdb/integrations/handlers).
</Tip>

## Troubleshooting

### Pip and Python Versions

Currently, MindsDB supports Python versions 3.10.x, and 3.11.x.

To successfully install MindsDB, use **Python 64-bit version**. Also, make sure
that **Python >= 3.10** and **pip >= 20.3**. You can check the pip and python
versions by running the `pip --version` and
`python --version` commands.

Please note that depending on your environment and installed pip and python
packages, you might have to use **pip3** instead of **pip** or **python3.x**
instead of **py**. For example, `pip3 install mindsdb` instead of
`pip install mindsdb`.

### How to Avoid Dependency Issues

Install MindsDB in a virtual environment using **pip** to avoid dependency
issues.

Or you could try to install MindsDB with
[Anaconda](https://www.anaconda.com/products/individual) and run the
installation from the **Anaconda prompt**.

### How to Avoid Common Errors

MindsDB requires around 3 GB of free disk space to install all of its
dependencies. Make sure to allocate min. 3 GB of disk space to avoid the
`IOError: [Errno 28] No space left on device while installing MindsDB` error.

Before anything, activate your virtual environment where your MindsDB is
installed. It is to avoid the `No module named mindsdb` error.


## Further Issues?

You can try to replicate your issue using the
[Docker setup](/setup/self-hosted/docker/).

Also, please create an issue with detailed description in the
[MindsDB GitHub repository](https://github.com/mindsdb/mindsdb/issues) so we can
help you. Usually, we review issues and respond within a few hours.

## What's Next

Now that you installed and started MindsDB locally in your Docker container, go ahead and find out how to create and train a model using the [`CREATE MODEL`](/sql/create/model) statement. In the **MindsDB SQL** section, you'll find a comprehensive overview of the SQL syntax offered by MindsDB.

You can connect MindsDB to different clients, including [PostgreSQL CLI](/connect/postgres-client) and [MySQL CLI](/connect/mysql-client).

Check out the [Use Cases](/use-cases/overview) section to follow tutorials that cover Large Language Models, Natural Language Processing, Time Series, Classification, and Regression models.
