Installation Guide
This guide will walk you through installing Muebles Roble on your local machine. The entire process takes about 10-15 minutes.Muebles Roble requires Python 3.10.11 specifically. Make sure you have the correct version installed before proceeding.
Prerequisites
Before you begin, ensure you have:- Python 3.10.11 installed
- pip package manager (included with Python)
- MySQL database server running
- Git for cloning the repository
- A terminal/command prompt
Verify Python Version
First, check that you have the correct Python version:Verify pip Installation
Installation Steps
Clone the Repository
Clone the Muebles Roble repository to your local machine:
Replace
<URL_DEL_REPOSITORIO> with the actual repository URL provided by your team or instructor.Create Virtual Environment
Create an isolated Python environment for the project:This creates a
venv/ directory containing a standalone Python installation.Virtual environments prevent dependency conflicts between different Python projects.
Activate Virtual Environment
Activate the virtual environment based on your operating system:When activated successfully, you’ll see
(venv) prefix in your terminal:Install Dependencies
Install all required Python packages from This will install the following packages:
Plus development tools:
requirements.txt:| Package | Version | Purpose |
|---|---|---|
| Flask | 3.1.2 | Web framework |
| Flask-SQLAlchemy | 3.1.1 | ORM for database |
| Flask-Migrate | 4.1.0 | Database migrations |
| Flask-WTF | 1.2.2 | Form handling & CSRF |
| PyMySQL | 1.1.2 | MySQL driver |
| python-dotenv | 1.2.1 | Environment variables |
| WTForms | 3.2.1 | Form validation |
| SQLAlchemy | 2.0.46 | SQL toolkit |
| alembic | 1.18.4 | Migration tool |
black- Code formattermypy- Type checker
Project Structure
After installation, your project directory should look like this:Understanding Key Files
run.py - Entry Point
Therun.py file is your application’s entry point:
- Creates the Flask application using the factory pattern
- Tests the database connection on startup
- Runs the development server with debug mode enabled
config.py - Configuration
Theconfig.py file manages all configuration:
requirements.txt - Dependencies
The complete dependency list:Common Installation Issues
Python version mismatch
Python version mismatch
Problem:
python --version shows a different version.Solution: Install Python 3.10.11 from python.org and ensure it’s in your PATH. You may need to use python3.10 instead of python.pip not found
pip not found
Problem:
pip: command not foundSolution: Install pip using:Virtual environment activation fails
Virtual environment activation fails
Problem: Script execution disabled on Windows.Solution: Run PowerShell as Administrator and execute:
PyMySQL installation fails
PyMySQL installation fails
Problem: Error installing
PyMySQL or cryptography.Solution: Install build tools:- Windows: Install Microsoft C++ Build Tools
- macOS: Install Xcode Command Line Tools:
xcode-select --install - Linux: Install
python3-devandbuild-essential
Permission denied errors
Permission denied errors
Problem: Permission errors during installation.Solution: Ensure you’re in the virtual environment (you should see
(venv) in your prompt). Never use sudo pip install.Deactivating the Virtual Environment
When you’re done working on the project, deactivate the virtual environment:(venv) prefix will disappear from your prompt.
Next Steps
Configuration
Set up your database connection and environment variables
First Steps
Run the application and create your first catalog entries