se agrega .md de tailscale para hacer gitea https
This commit is contained in:
1 parent
f915802fb4
commit
920a4a2d56
10 files changed
+2081
-2066
No files matched your search
@@ -0,0 +1,84 @@
|
||||
# Creación de entornos virtuales en Python
|
||||
|
||||
## Requisitos
|
||||
|
||||
- Tener Python instalado.
|
||||
- Verificar:
|
||||
|
||||
``` bash
|
||||
python --version
|
||||
```
|
||||
|
||||
## Crear el entorno
|
||||
|
||||
``` bash
|
||||
python -m venv .venv
|
||||
```
|
||||
|
||||
## Activar
|
||||
|
||||
### macOS / Linux
|
||||
|
||||
``` bash
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
### Windows CMD
|
||||
|
||||
``` cmd
|
||||
.venv\Scripts\activate.bat
|
||||
```
|
||||
|
||||
### Windows PowerShell
|
||||
|
||||
``` powershell
|
||||
.venv\Scripts\Activate.ps1
|
||||
```
|
||||
|
||||
## Instalar dependencias
|
||||
|
||||
``` bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
o
|
||||
|
||||
``` bash
|
||||
pip install requests fastapi uvicorn
|
||||
```
|
||||
|
||||
## Guardar dependencias
|
||||
|
||||
``` bash
|
||||
pip freeze > requirements.txt
|
||||
```
|
||||
|
||||
## Desactivar
|
||||
|
||||
``` bash
|
||||
deactivate
|
||||
```
|
||||
|
||||
## Verificar el intérprete
|
||||
|
||||
``` bash
|
||||
python -c "import sys; print(sys.executable)"
|
||||
```
|
||||
|
||||
## .gitignore recomendado
|
||||
|
||||
``` gitignore
|
||||
.venv/
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
.vscode/
|
||||
.idea/
|
||||
.env
|
||||
.pytest_cache/
|
||||
.mypy_cache/
|
||||
.ruff_cache/
|
||||
*.sqlite3
|
||||
*.db
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
```
|
||||
Reference in new issue
Block a user