Install pyenv first with pyenv-installer
# need to be forced because it conflict with jpeg-turbo
brew install jpeg && brew link jpeg --force
# same, need to be forced because it conflict with lzlib
brew install zlib && brew link zlib --force
# install postgresql and start the services, so it will run at login
brew install postgresql@12 && brew link postgresql@12 && brew services start postgresql@12
# install python3.7.13 with pyenv
pyenv install 3.7.13
# clone odoo11, and cd to the cloned repository
# .....
# create new virtualenv for odoo11
pyenv virtualenv 3.7.13 odoo11
# set the directory as odoo11, so when open this directory, will automatically use venv odoo11
pyenv local odoo11
# upgrade pip, and downgrade setuptools to v57.5 since 2to3 only exist until version 57.5
pip install --upgrade pip
pip install setuptools==57.5 wheel
pip install -r requirements.txt
- Issue with psycopg2 failed to build, because postgresql is not yet installed, then can't find pg_config
brew install postgresql@12
(or any postgresql version)brew link postgresql@12
- restart the terminal
- run
pip install -r requirements.txt
again
- Issue when install requirements.txt, failed when build cryptography and says
"openssl/opensslv.h" file not found
or psycopg and saysld: library not found for -lssl
# install openssl@1.1 export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix openssl@1.1)/lib/ # try to install requirements.txt again pip install -r requirements.txt
- Issue when installing Pillow on the requirements.txt, error about missing zlib
# Install zlib with homebrew brew install zlib # and link zlib with flag --force, need to be forced since it's conflict with lzlib brew link zlib --force # then run the install again