1/17/2024 0 Comments Install postgresql mac m1 brewTo activate the environment: pyenv activate odoo-14-env Now we will create our virtual env for Odoo 14 using Python 3.9.2 that we installed before: pyenv virtualenv 3.9.2 odoo-14-env (If you are working with Odoo /dev/null then eval "$(pyenv virtualenv-init -)" fiĭon't forget to source your file to reload your config with source ~/.zshrc or source ~/.bash_profile Repeat the process for every other python you want to install. If everything went okay you should see: Installed Python-3.9.2 to /Users/odootuts/.pyenv/versions/3.9.2 Xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun You may encounter a message like that: configure: error: C compiler cannot create executables You may run into errors at this point, for multiples reasons but an example may be that you already installed Xcode command line tools in the past but upgraded your macOS version. With this example, we are installing 3.9.2: pyenv install 3.9.2 If the version you need is missing, try upgrading pyenv: brew update & brew upgrade pyenv Pyenv advises us to install more dependencies before installing python: brew install openssl readline sqlite3 xz zlibįirst, we are going to check what versions are available, we are interested in the latest 3.9:to run pyenv install If we want to install python 3.9 for example we can type pyenv install 3.9 and the shell will correct us by showing us the full version name available ▶ pyenv install -list | grep 3.9 To correctly add Pyenv to your path copy the following commands: echo -e $'if command -v pyenv 1>/dev/null 2>&1 then To make our life easier and not mess with the python shipped with the macOS system we will install pyenv Pyenv brew install pyenv You can change the default version with : nvm alias default 10.24.0Īs Python developers, working with Odoo may lead us to work with python 2.7 (Odoo 8, 9, 10) or python 3.x for the more recent versions of Odoo (11, 12, 13, 14). To switch between versions shown in nvm list: nvm use default To list the stable versions of NodeJs : nvm ls-remote -ltsįor this tutorial we are choosing this version: nvm install v10.24.0 Install nvm by copy-pasting the install script command into your terminal. To avoid future problems we are using nvm, allowing us to have multiple node NodeJs versions on our machine And the command line arguments changed, for example, Odoo 10 trying to launch the command less with its arguments may result in an error because the package installed with npm (Node Package Manager) is too recent. If you had older PostgreSQL versions installed with brew and upgraded, you need to also upgrade the databases with: brew postgresql-upgrade-databaseįor Odoo we will also need multiple versions of NodeJS, the main library used by Odoo is Less with the old versions. PostgreSQL is automatically configured to be restarted when you log on to your computer next time If you want to install specific versions you can, for example: brew install įor Odoo 14.0 postgresql version must be > 10.0Īfter install, PostgreSQL will be available as a homebrew service, you can start the service with the command: brew services start postgresql We are going to install the latest PostgreSQL via Homebrew brew install postgresql Se we are using homebrew to install it: brew install git PostgreSQL MacOS already comes with Git but as is with python and other libraries it's better to leave the system ones alone and have our own versions that we can upgrade. You will be asked for your password, to make sure everything works, run brew doctor, it will inform you, and fix problems with packages that lost their links and conflicts between shared dependencies. Then for Homebrew itself, referring to what's written on the homepage : /bin/bash -c "$(curl -fsSL )" From your terminal run this command xcode-select -installĭepending on your OS version you may need to open Xcode itself one time first and accept some User Licences Agreements. But first, an important dependency for Homebrew is the Command Line Developer Tools for Xcode (It includes compilers that will allow our machine to build the library from sources). We will use it to install most of the other required tools. Homebrew is a package manager for macOS, the most popular one. In this tutorial, we will see how to set up your macOS for Odoo 14 development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |