Struggling to Set Up Your Odoo Dev Environment? Here’s a Step-by-Step Guide
Ever spent hours wrestling with software installations, only to end up with cryptic error messages and a headache? If you’re trying to set up Odoo for development, you’re not alone. Many developers—especially beginners—hit roadblocks with dependencies, database setups, or version conflicts.
But don’t worry! This guide will walk you through setting up a smooth Odoo 16 development environment, avoiding common pitfalls, and getting you ready to build custom modules in no time.
Why Odoo Development?
Odoo is a powerful open-source ERP system used by businesses worldwide. Whether you’re customizing it for a client or building your own business solutions, a proper dev environment is crucial.
Key Benefits:
✔ Flexibility – Modify Odoo to fit exact business needs
✔ Cost-Effective – Open-source means no licensing fees
✔ High Demand – Odoo developers are in demand globally
Let’s get your environment ready!
Step 1: Install Python 3.x
Odoo is built on Python, so you’ll need Python 3.7 or later.
For Windows:
- Download Python from python.org
- Check "Add Python to PATH" during installation
- Verify installation:
python --version
For Linux/macOS:
Most systems come with Python preinstalled. If not:
sudo apt update && sudo apt install python3 # Ubuntu/Debian
brew install python # macOS (Homebrew)
Step 2: Set Up PostgreSQL
Odoo uses PostgreSQL as its database backend.
Installation:
- Windows: Download from PostgreSQL’s official site
Linux (Ubuntu/Debian):
sudo apt install postgresql postgresql-clientmacOS:
brew install postgresql
Create a Database User:
sudo -u postgres createuser -s $USER
(This creates a PostgreSQL user matching your system username.)
Step 3: Clone the Odoo GitHub Repository
Odoo’s source code is available on GitHub. We’ll use Odoo 16 (stable version).
git clone https://github.com/odoo/odoo.git --branch 16.0 --depth 1
(--depth 1 avoids downloading full commit history, saving time.)
Step 4: Use a Virtual Environment (Avoid Dependency Hell!)
Python dependencies can conflict. A virtual environment keeps things clean.
Create & Activate a Virtual Environment:
python -m venv odoo-venv
source odoo-venv/bin/activate # Linux/macOS
odoo-venv\Scripts\activate # Windows
Install Required Dependencies:
Navigate to your Odoo folder and run:
pip install -r requirements.txt
Step 5: Run Odoo for the First Time
Now, start Odoo with:
python odoo-bin --addons-path=addons --db-filter=^odoo-dev$
--addons-pathtells Odoo where your modules are--db-filterhelps avoid accidental production DB changes
Open your browser to http://localhost:8069.
🎉 If you see the Odoo setup screen, congratulations!
Common Issues & Fixes
❌ Error: "psycopg2" not installed
👉 Fix: pip install psycopg2-binary
❌ PostgreSQL connection failures
👉 Fix: Ensure PostgreSQL is running (sudo service postgresql start)
❌ Missing dependencies (Wkhtmltopdf, Node.js, etc.)
👉 Install them:
sudo apt install wkhtmltopdf nodejs npm # Ubuntu/Debian
Next Steps: Start Developing!
Now that your environment is ready:
✔ Create a custom module (./odoo-bin scaffold my_module)
✔ Explore Odoo’s ORM (Object-Relational Mapping for database operations)
✔ Join the Odoo Community (Forums, GitHub, Discord)
Final Thought: Got It Running?
Setting up Odoo can be tricky, but once it’s done, you unlock endless customization possibilities.
Did this guide help you? Drop a 🎉 in the comments or share your biggest setup challenge!
Happy coding! 🚀