You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
01/docs/getting-started/getting-started.mdx

115 lines
4.7 KiB

---
title: "Getting Started"
description: "Preparing your machine"
---
4 months ago
## Prerequisites
4 months ago
To run the 01 on your computer, you will need to install the following essential packages:
4 months ago
- Git
- Python (version 3.11.x recommended)
- Poetry
- FFmpeg
4 months ago
## Installation Guide
4 months ago
### For All Platforms
4 months ago
1. **Git**: Download and install Git from the [official website](https://git-scm.com/downloads).
4 months ago
2. **Python**:
- Download Python 3.11.x from the [official Python website](https://www.python.org/downloads/).
- During installation, make sure to check "Add Python to PATH".
4 months ago
3. **Poetry**:
- Follow the [official Poetry installation guide](https://python-poetry.org/docs/#installing-with-the-official-installer).
- If you encounter SSL certificate issues on Windows, see the Windows-specific instructions below.
4 months ago
4. **FFmpeg**: Installation instructions vary by platform (see below).
4 months ago
### Platform-Specific Instructions
#### MacOS
6 months ago
4 months ago
We recommend using Homebrew to install the required dependencies:
```bash
brew install portaudio ffmpeg cmake
6 months ago
```
#### Ubuntu
6 months ago
4 months ago
**Note**: Wayland is not supported. These instructions are for Ubuntu 20.04 and below.
Install the required packages:
6 months ago
```bash
4 months ago
sudo apt-get update
6 months ago
sudo apt-get install portaudio19-dev ffmpeg cmake
```
#### Windows
6 months ago
4 months ago
1. **Git**: Download and install [Git for Windows](https://git-scm.com/download/win).
2. **Python**:
- Download Python 3.11.x from the [official Python website](https://www.python.org/downloads/windows/).
- During installation, ensure you check "Add Python to PATH".
3. **Microsoft C++ Build Tools**:
- Download from [Microsoft's website](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
- Run the installer and select "Desktop development with C++" from the Workloads tab.
- This step is crucial for Poetry to work correctly.
4. **Poetry**:
- If the standard installation method fails due to SSL issues, try this workaround:
1. Download the installation script from [https://install.python-poetry.org/](https://install.python-poetry.org/) and save it as `install-poetry.py`.
2. Open the file and replace the `get(self, url):` method with:
```python
def get(self, url):
import ssl
import certifi
request = Request(url, headers={"User-Agent": "Python Poetry"})
context = ssl.create_default_context(cafile=certifi.where())
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
with closing(urlopen(request, context=context)) as r:
return r.read()
```
3. Run the modified script to install Poetry.
- Add Poetry to your PATH:
1. Press Win + R, type "sysdm.cpl", and press Enter.
2. Go to the "Advanced" tab and click "Environment Variables".
3. Under "User variables", find "Path" and click "Edit".
4. Click "New" and add: `C:\Users\<USERNAME>\AppData\Roaming\Python\Scripts`
5. Click "OK" to close all windows.
5. **FFmpeg**:
- Download the latest FFmpeg build from the [BtbN GitHub releases page](https://github.com/BtbN/FFmpeg-Builds/releases).
- Choose the `ffmpeg-master-latest-win64-gpl.zip` (non-shared suffix) file.
- Extract the compressed zip file.
- Add the FFmpeg `bin` folder to your PATH:
1. Press Win + R, type "sysdm.cpl", and press Enter.
2. Go to the "Advanced" tab and click "Environment Variables".
3. Under "System variables", find "Path" and click "Edit".
4. Click "New" and add the full path to the FFmpeg `bin` folder (e.g., `C:\path\to\ffmpeg\bin`).
5. Click "OK" to close all windows.
## What is Poetry?
Poetry is a dependency management and packaging tool for Python. It simplifies the process of managing project dependencies, ensuring consistent environments across different setups. We use Poetry to guarantee that everyone running 01 has the same environment and dependencies.
## Troubleshooting
### Windows-Specific Issues
1. **Poetry Install Error**: If you encounter an error stating "Microsoft Visual C++ 14.0 or greater is required" when running `poetry install`, make sure you have properly installed the Microsoft C++ Build Tools as described in step 3 of the Windows installation guide.
2. **FFmpeg Not Found**: If you receive an error saying FFmpeg is not found after installation, ensure that you've correctly added the FFmpeg `bin` folder to your system PATH as described in step 5 of the Windows installation guide.
3. **Server Connection Issues**: If the server connects but you encounter errors when sending messages, double-check that all dependencies are correctly installed and that FFmpeg is properly set up in your PATH.
## Next Steps
Once you have successfully installed all the prerequisites, you're ready to clone the repository and set up the project.