Skip to content

Environment Setup

Mauricio Matos edited this page Jun 6, 2022 · 5 revisions

Dependency Installation

System

Run the fallowing comands in your Terminal:

`sudo apt-get update`

`sudo apt-get upgrade`

`sudo apt-get install software-properties-common -y`

`sudo apt-get install python-software-properties`

`sudo apt-get install python-dev`

`sudo apt install python3.7`

Virtual Environment

We will create a virtual environment in such a way that unique python executables are created for each version with its necessary dependencies:

`pip install virtualenv`

`mkdir ~/.virtualenvs`

`virtualenv --python='which python<version>' ~/.virtualenvs/<file_name>`

Work Environment

In this instance we will installing Odoo and the dependencies of the version we wanted. In your home directory run the following commands:

`mkdir ~/<file_work_name>`

`mkdir odoo`

`cd odoo`

`mkdir odoo<version>`

`cd odoo<version>`

`git clone https://github.com/odoo/odoo.git --branch <branch> --depth 1 `

Open Pycharm (if you don't have it, proceed to install it)

Click on the files tab and select Settings In the open window select project, python interpreter and to add the interpreter path you have to select the cog icon and click on add interpreter, you have to put the absolute path of your interpreter (command to find the absolute path which 'file_name' )

Screenshot from 2022-06-06 10-12-41

Proceed to the Pycharm terminal to activate the virtualenv with the command:

source ~/.virtualenvs/odoo14/bin/activate

Once accessed we enter the Odoo folder stored in the directories that we saved and copied, to access this you must copy the absolute path.

~Ex: cd /home/pro02001/dev/odoo13/odoo

View the requirements.txt file, in this you will find all the files necessary for the installation of the dependency, with the command:

pip install -r requirements.txt

Clone this wiki locally