Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions components/layouts/tileContainer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import styles from "./tileContainer.module.css";

const TilesContainer = ({ children }) => {
return <section className={styles.Container}>{children}</section>;
const TilesContainer = ({ layout, children }) => {
const classes =
layout == "list" ? styles.ListContainer : styles.GridContainer;

return <section className={classes}>{children}</section>;
};

export default TilesContainer;
6 changes: 5 additions & 1 deletion components/layouts/tileContainer.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.Container {
.GridContainer {
@apply grid grid-cols-6 gap-4 mb-12;
}

.ListContainer {
@apply flex flex-col gap-4 mb-12;
}
17 changes: 15 additions & 2 deletions content/get-started/installation/anaconda-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,22 @@ This page walks you through installing Streamlit locally using Anaconda Distribu

## Prerequisites

Anaconda Distribution includes Python so all you need beforehand is your favoriate code editor.
1. **A code editor**

- We use [VS Code](https://code.visualstudio.com/download) in our tutorials.
Anaconda Distribution includes Python and basically everything you need to get started.
The only thing left for you to choose is a code editor.

Our favorite editor is [VS Code](https://code.visualstudio.com/download), which is also what we
use in all our tutorials.

1. **Knowledge about environment managers**

Environment managers create virtual environments to isolate Python package installations between
projects. For a detailed introduction to Python environments, check out
[Python Virtual Environments: A Primer](https://realpython.com/python-virtual-environments-a-primer/).

But don't worry! In this guide we'll teach you how to install and use an environment manager
(Anaconda).

## Install Anaconda Distribution

Expand Down
37 changes: 33 additions & 4 deletions content/get-started/installation/command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,40 @@ This page will walk you through creating an environment with `venv` and installi

## Prerequisites

Before you get started, make sure you have Python and a code editor installed.
As with any programming tool, in order to install Streamlit you first need to make sure your
computer is properly set up. More specifically, you’ll need:

- We use [VS Code](https://code.visualstudio.com/download) in our tutorials.
- Streamlit requires [Python 3.8 - Python 3.12](https://www.python.org/downloads/).
- (macOS only) Streamlit also requires [Xcode command line tools](https://mac.install.guide/commandlinetools/4.html).
1. **Python**

We support [version 3.8 to 3.12](https://www.python.org/downloads/).

1. **A Python environment manager** (recommended)

Environment managers create virtual environments to isolate Python package installations between
projects.

We recommend using virtual environments because installing or upgrading a Python package may
cause unintentional effects on another package. For a detailed introduction to Python
environments, check out
[Python Virtual Environments: A Primer](https://realpython.com/python-virtual-environments-a-primer/).

For this guide, we'll be using `venv`, which comes with Python.

1. **A Python package manager**

Package managers handle installing each of your Python packages, including Streamlit.

For this guide, we'll be using `pip`, which comes with Python.

1. **Only on MacOS: Xcode command line tools**

Download Xcode command line tools using [these instructions](https://mac.install.guide/commandlinetools/4.html)
in order to let the package manager install some of Streamlit's dependencies.

1. **A code editor**

Our favorite editor is [VS Code](https://code.visualstudio.com/download), which is also what we use in
all our tutorials.

## Create an environment using `venv`

Expand Down
53 changes: 26 additions & 27 deletions content/get-started/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ slug: /get-started/installation

# Installation

There are multiple ways to set up your development environment and install Streamlit. Read below to understand these options. Developing locally with Python installed on your own computer is the most common scenario.
There are multiple ways to set up your development environment and install Streamlit. Read below to
understand these options. Developing locally with Python installed on your own computer is the most
common scenario.

<div style={{padding: "0 20px 10px 30px", border: "1px solid gray", borderRadius: "20px"}}>
## Summary for experts

## Summary for local development

1. Set up your Python development environment. (See below for explanation.)
1. Set up your Python development environment.
2. Run:
```bash
pip install streamlit
Expand All @@ -22,35 +22,34 @@ There are multiple ways to set up your development environment and install Strea
```
4. Jump to our [Main concepts](/get-started/fundamentals/main-concepts).

</div>
## Installation steps for the rest of us

<TileContainer layout="list">

<RefCard href="/get-started/installation/command-line" size="half">

##### Option 1: I'm comfortable with the command line

Install Streamlit on your own machine using tools like `venv` and `pip`.

## Python environments
</RefCard>

As with any programming tool, in order to install Streamlit you first need to make sure your computer is properly set up. More specifically, you’ll need:
<RefCard href="/get-started/installation/anaconda-distribution" size="half">

1. Python
2. A Python environment manager (recommended)
3. A Python package manager
##### Option 2: I prefer a graphical interface

Environment managers create virtual environments to isolate Python package installations between projects. Within an environment, a package manager handles installing each of your Python packages, including Streamlit. We recommend using virtual environments because installing or upgrading a Python package may cause unintentional effects on another package. For a detailed introduction to Python environments, check out [Python Virtual Environments: A Primer](https://realpython.com/python-virtual-environments-a-primer/).
Install Streamlit using the Anaconda Distribution graphical user interface. This is also the best
approach if you're on Windows and don't have Python set up.

### Option 1: I'm comfortable with the command line.
</RefCard>

<InlineCalloutContainer spacing="singleton">
<InlineCallout color="orange-70" icon="terminal" bold="Install Streamlit using command line" href="/get-started/installation/command-line">
</InlineCallout>
</InlineCalloutContainer>
<RefCard href="/get-started/installation/community-cloud" size="half">

### Option 2: I prefer a graphical interface.
##### Option 3: I'd rather use a Cloud-based environment

<InlineCalloutContainer spacing="singleton">
<InlineCallout color="orange-70" icon="space_dashboard" bold="Install Streamlit using Anaconda Distribution" href="/get-started/installation/anaconda-distribution">
</InlineCallout>
</InlineCalloutContainer>
Use Streamlit Cloud with GitHub Codespaces, so you don't have to go through the trouble of
installing Python, setting up an environment, etc.

### Option 3: I don't want to install anything on my computer.
</RefCard>

<InlineCalloutContainer spacing="singleton">
<InlineCallout color="orange-70" icon="developer_mode" bold="Use Community Cloud to develop with GitHub Codespaces" href="/get-started/installation/community-cloud">
</InlineCallout>
</InlineCalloutContainer>
</TileContainer>