Hello world. How are you today ? Are want to install odoo 9 on mac with packages home-brew, now you can make it happen in your mac. Just do my step by step and i will give you perfect way to get odoo in your mac. In this post i will show you how to install odoo on mac with packages homebrew. Iam so really interested talk about home-brew cause with this packages we can do anything like we use linux on your mac.
As you know home-brew is a "the missing packages for os x". With Homebrew we can install packages in the console as we can in the most Linux distributions. So first step you need install with this command in your console (terminal) :
1. Install Homebrew :
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. Install Python with Brew
After this we can install Python. If you already did this with a downloaded installer you can skip installing Python with Homebrew but I cannot guarantee for that. If you have problems then uninstall Python and try the package from Homebrew. To install run and follow the instructions:
brew update brew install python
3. Install PostgreSQL
Now we have installed Python. Next we need the PostgreSQL server. Here we can also use Homebrew:
brew install postgresql
remember if you have already odoo on your mac, using this command first before you run odoo. To start the PostgreSQL right now and automatically at system startup we run:
4. Install some Dependencies for the Pillow module
brew install freetype jpeg libpng libtiff webp xz
5. Install Dependencies Python Module for Odoo
Next we can decide how to install the Python dependencies for odoo. One way is to install these globally. If you developing on other Python applications you sometimes need the same Python packages but in different versions. Or you want to let the system clear and remove these easy when you do not need them anymore. To get these advantages we can create a virtual environment for Python. This virtual environment copies Python and some other files (like pip) to a specified directory (e.g. in your home path) and provides a script which rewrites the path to use the Python from this directory.
To install the Python dependencies we use pip which is package manager for Python (like Homebrew but for Python modules) and is already installed with Python. For creating the virtual environment we have to install virtualenv. Homebrew does not contain virtualenv so we install it with pip (globally):
pip install virtualenv
Now we can create the virtual environment. We use for this the directory odoo-env in our home directory:
virtualenv ~/odoo-env
With this command all necessary files were copied to this directory. Next we enter the created virtual environment:
. ~/odoo-env/bin/activate
Okay, all looking the same as before? :) We can look if we are in this virtual environment:
which python /Users/youruser/odoo-env/bin/python
As you can see the Python binary from this directory is used. If you want to leave this environment you can type deactivate or close the terminal. Be aware that if you open a new tab or reopen the terminal you are not in the environment. Here you have to run the activate script as before.
Now we can start installing all dependencies for odoo. Download odoo if you did not have (e.g. clone the git repository) . In the newer odoo versions there is a requirements.txt file which contains all dependencies. To install these you have to change to the odoo directory (with cd) and run (you have to be in your virtual environment):
pip install -r requirements.txt
if you get some text like this, you should be happy. Lol
Successfully installed [...] Cleaning up...
You have installed all dependencies. Now you can start odoo with this command :
python ./odoo.py
and will show like this.
2014-12-16 09:52:28,172 2974 INFO ? openerp: OpenERP version 8.0 2014-12-16 09:52:28,172 2974 INFO ? openerp: addons paths: ['/Users/youruser/Library/Application Support/Odoo/addons/8.0', u'/Users/youruser/odoo/openerp-v8/openerp/addons', u'/Users/youruser/odoo/openerp-v8/addons'] 2014-12-16 09:52:28,172 2974 INFO ? openerp: database hostname: localhost 2014-12-16 09:52:28,172 2974 INFO ? openerp: database port: 5432 2014-12-16 09:52:28,172 2974 INFO ? openerp: database user: youruser 2014-12-16 09:52:28,328 2974 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069 2014-12-16 09:53:32,095 2974 INFO ? openerp.addons.bus.bus: Bus.loop listen imbus on db postgres …
Then you can open your browser and open http://localhost:8069 .
Here you can create a new database with or without demo data and playing/developing with odoo. If you done you can stop with CTRL+C in your console.
Now you can create database, user name and password for do development in first user interface. After you have done with first set up, you will meet the backend UI Odoo 9.
You can install all apps that you want or you want to develop custom module for Odoo 9. But remember as you can see, we run with python so you need to start and restart when you want run or stop Odoo.
For start service you can use this command :
virtualenv ~/odoo-env . ~/odoo-env/bin/activate ./odoo.py
Actually when i was install Odoo on mac, i have so many problem so if you have problem you can write comment bellow and i will help you as i can.
The last step has refused to run. I run "./odoo-bin" I get "env: python3: No such file or directory" error. Kindly help
ReplyDeleteU need to restart postgresql: brew services restart postgresql
DeleteI got same problem
ReplyDeleteGreat Work..
ReplyDeleteAll of you make sure that the version of python is compatible with the version of odoo.
is odoo repository moved into odoo-env?
ReplyDeleteWonderful, Informative blog!!!!!
ReplyDeleteThank you so much for sharing such an amazing piece of information with us. I hope that you will share some more in near future. Keep sharing. Odoo Support
Nice article! Very informative blog. Looking for the best Mobile App Development Company in Australia? Reach IDYA Technology.
ReplyDeleteInstalling Odoo on your Mac using Homebrew can streamline your workflow, especially for those in the mobile app development company sector. By leveraging Homebrew, you can easily manage dependencies and keep your environment organized. Odoo’s features can greatly enhance project management and CRM capabilities for mobile app developers, making it a valuable tool. Just follow the steps for installing Homebrew, then use it to install the necessary packages like PostgreSQL and Odoo itself. This setup will not only boost your productivity but also facilitate better collaboration within your team. Happy coding!
ReplyDelete