e7adb65d40
Normalizacao OKF dos .md: type/title/description/timestamp/layer + descriptions factuais (rich abstracts). Apenas .md tracked; corpos intactos. Parte da aplicacao OKF a /Dados/Dev (28-06-2026). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
59 lines
1.3 KiB
Markdown
Executable File
59 lines
1.3 KiB
Markdown
Executable File
---
|
|
type: Document
|
|
title: Setup Ubuntu
|
|
description: >-
|
|
O teu sistema Ubuntu/Debian protege o ambiente Python global com `externally-managed-environment`
|
|
timestamp: 2025-07-03T04:08:09.659909+00:00
|
|
layer: wiki
|
|
---
|
|
# Setup rápido para resolver o problema do ambiente Python
|
|
|
|
## Problema
|
|
O teu sistema Ubuntu/Debian protege o ambiente Python global com `externally-managed-environment`.
|
|
|
|
## Solução Imediata
|
|
|
|
### Opção 1 - Script Automático com Ambiente Virtual (RECOMENDADO):
|
|
```bash
|
|
chmod +x run_gemini_tts_venv.sh
|
|
./run_gemini_tts_venv.sh
|
|
```
|
|
|
|
### Opção 2 - Manual com Ambiente Virtual:
|
|
```bash
|
|
# Criar e ativar ambiente virtual
|
|
python3 -m venv venv
|
|
source venv/bin/activate
|
|
|
|
# Instalar dependências
|
|
pip install google-genai
|
|
|
|
# Executar script
|
|
python gemini_tts.py
|
|
```
|
|
|
|
### Opção 3 - Instalar System-wide (não recomendado):
|
|
```bash
|
|
pip install google-genai --break-system-packages
|
|
python gemini_tts.py
|
|
```
|
|
|
|
### Opção 4 - Com pipx (se tiveres pipx instalado):
|
|
```bash
|
|
pipx install google-genai
|
|
python gemini_tts.py
|
|
```
|
|
|
|
## Solução Definitiva
|
|
|
|
O script `run_gemini_tts_venv.sh` resolve automaticamente:
|
|
- Cria ambiente virtual isolado
|
|
- Instala dependências sem conflitos
|
|
- Executa o gerador de voz
|
|
- Mantém tudo organizado
|
|
|
|
Execute apenas:
|
|
```bash
|
|
./run_gemini_tts_venv.sh
|
|
```
|