Odoo on macOS: A Step-by-Step Guide
Odoo Enterprise Development Environment on macOS (Clean Install + PyCharm Setup)
🔧 Step 1: Install Xcode Command Line Tools
Open your terminal and run:
xcode-select --install
🍺 Step 2: Install Homebrew
Homebrew is the package manager for macOS. To install it, run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
For more details, visit the Homebrew official website.
🛠️ Step 3: Add Homebrew to Your PATH
After installing Homebrew, you need to add it to your shell environment so you can use the brew command in the terminal. Run the following commands:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/YOUR_MAC_USERNAME/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"'
🐍 Step 4: Install Python
Odoo requires a specific version of Python depending on which version of Odoo you're installing.
To install the correct Python version, replace XX below with the Python version number recommended for your Odoo version:
brew install python@3.XX
🗂️ Step 5: Install wkhtmltopdf
Odoo needs a specific patched version of wkhtmltopdf for PDF reports to work correctly.
Go to the official downloads page:
https://wkhtmltopdf.org/downloads.html
Download the installer or package for your OS and install it following the instructions on the site.
📁 Step 6: Create Working Directories
Now let’s create a folder structure for your Odoo project. You can create it anywhere — in this example, we’ll place it in the home directory.
Replace XX with your Odoo version (e.g. 16, 17, 18):
mkdir -p ~/work/{odoo-XX,odoo-enterprise,odooXX-custom-addons/extra}
This will create the following directories:
odoo-XX: your main Odoo (community) source;
odoo-enterprise: for enterprise source code (if using Odoo Enterprise);
odooXX-custom-addons/extra: for custom modules.
🐍 Step 7: Create and Activate a Python Virtual Environment
Navigate to your main Odoo directory and create a virtual environment using the appropriate Python version:
cd ~/work/odoo-XX
python3.XX -m venv odooXXenv
source odooXXenv/bin/activate
Once activated, your terminal prompt will change — indicating that the virtual environment is active. All Python packages installed from now on will be isolated within this environment:
(odooXXenv) YOUR_MAC_USERNAME odoo-XX %
🧬 Step 8: Install Git and Clone Odoo Source Code
First, install Git (if you haven't already):
brew install git
Then, clone the official Odoo repository from GitHub. Replace XX with your target Odoo version (e.g. 17.0, 18.0) and adjust the folder name accordingly:
git clone https://github.com/odoo/odoo.git -b XX.0 --single-branch --depth 1 odoo-XX
🐘 Step 9: Install PostgreSQL
Install PostgreSQL via Homebrew:
brew install postgresql
📦 Step 10: Install Essential Python Packages Manually
Before installing Odoo's full list of dependencies, it’s a good idea to install a few core Python packages manually — especially ones that may cause build errors if missing.
Replace XX with your Python version (e.g. 3.9, 3.10):
python3.XX -m pip install wheel setuptools psycopg2-binary
📄 Step 11: Install Python Dependencies from requirements.txt
Navigate to your Odoo source folder and install all required Python packages (replace XX with your Odoo and Python version (e.g. 16, 3.9).):
cd ~/work/odoo-XX
python3.XX -m pip install -r requirements.txt
This will install all core dependencies listed by Odoo for your version.
💼 Step 12: Get Access to the Odoo Enterprise Codebase
If you're working with the Enterprise edition of Odoo, you'll need access to the private Enterprise repository:
👉 https://github.com/odoo/enterprise
📥 Step 13: Add Odoo Enterprise Code to Your Project
Navigate to your odoo-enterprise directory:
cd ~/work/odoo-enterprise
Then either:
Option 1: Clone from GitHub (if you have access):
git clone --branch XX.0 --single-branch --depth 1 https://github.com/odoo/enterprise.git enterpriseXX
Option 2: Use .zip archive (if you don’t have access):
Unzip the archive and move its contents to the ~/work/odoo-enterprise directory manually.
💻 Step 14: Before You Start: Install PyCharm (Recommended IDE)
For this guide, we’ll be using PyCharm as the development environment — specifically the version for Apple Silicon (M1/M2/M3 chips):
👉 Download PyCharm for Apple Silicon
🧱 Step 15: Create a New Project in PyCharm
Now let’s set up your Odoo project in PyCharm.
Go to File → New Project;
In the left panel, select "Pure Python";
Name your project something like odooXX (replace XX with your version, e.g. odoo16);
Set Location to the directory where your Odoo project is located — for example:
~/work/odooXX
Under "Python Interpreter", browse and select the Python interpreter from the virtual environment you created earlier:
~/work/odoo-XX/odooXXenv/bin/python3.XX
Under "Python Interpreter", browse and select the Python interpreter from the virtual environment you created earlier:
- Click "OK", then "Create".
PyCharm will create and open your new project.
🐳 Step 16: Set Up PostgreSQL in Docker (for Odoo)
In the root folder of your project (e.g. ~/work/odooXX), create a file named docker-compose.yaml and paste the following content:
version: "3.3"
services:
odooXX_db:
container_name: odooXX_db
image: postgres
env_file:
- environment/database.env
ports:
- "5432:5432"
volumes:
- odooXX_db_volume:/var/lib/postgresql/data
volumes:
odooXX_db_volume: {}
Inside your project, create a folder named environment, and inside it, create a file called database.env with the following contents:
POSTGRES_USER=odoo
POSTGRES_PASSWORD=odoo
POSTGRES_DB=postgres
In the PyCharm terminal (or any terminal inside your project root), run:
docker-compose up
⚙️ Step 17: Create odoo.conf Configuration File
In the root folder of your project (e.g. ~/work/odooXX), create a folder named etc and create the configuration file odoo.conf inside the folder with the following content:
[options]
addons_path = /Users/YOUR_MAC_USERNAME/work/odoo-XX/odoo/addons/,/Users/YOUR_MAC_USERNAME/work/odoo-enterprise/enterprise-XX/,/Users/YOUR_MAC_USERNAME/work/odooXX-custom-addons/extra/
admin_passwd = parole123
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
cpu_time_limit = 15000
db_name = False
list_db = True
log_db = False
log_db_level = warning
limit_time_real = 10000
limit_memory_hard = 0
bin_path = /usr/local/bin/wkhtmltopdf
🔗 Step 18: Create addons Folder and Set Symlinks
In the root folder of your Odoo project (e.g. ~/work/odooXX), create a folder named addons and create symbolic links (symlinks) to your addons folders:
ln -s /Users/YOUR_MAC_USERNAME/work/odoo-enterprise/enterprise-XX ~/work/odooXX/addons/
ln -s /Users/YOUR_MAC_USERNAME/work/odooXX-custom-addons/extra ~/work/odooXX/addons/
▶️ Step 19: Create Odoo Run/Debug Configuration in PyCharm
- Open PyCharm and open your Odoo project;
- In the upper right corner, click on the dropdown menu (usually says "Current File") and select Edit Configurations...;
- Click Add New Configuration, then choose Python;
- Fill in the fields as follows:
- Name: odoo-bin
- Script path: /Users/YOUR_MAC_USERNAME/work/odooXX/odoo/odoo-bin
- Parameters (under Script path): -c /Users/YOUR_MAC_USERNAME/work/odooXX/etc/odoo.conf --dev=all
- Working directory: /Users/YOUR_MAC_USERNAME/work/odooXX
Click OK to save the configuration.
▶️ Step 20: Add Odoo Community Modules Folder to Project Structure in PyCharm
To make it easier to search and navigate the Odoo code in PyCharm and Finder, add the addons folder to your project structure:
Open PyCharm;
Go to PyCharm → Settings;
Navigate to Project Structure;
Click Add Content Root;
Select the folder with Odoo community modules:
/Users/YOUR_MAC_USERNAME/work/odooXX/addons/
Click OK to confirm.
🚀 Step 21: Run Odoo and Enjoy!
Simply click the Run ▶️ or Debug 🐞 button in the top-right corner of PyCharm to start your Odoo server.
Sit back, relax, and enjoy your life while Odoo runs smoothly! 😎🎉