macOS: Fix missing pip command issue. (#22924)

* Fixed missing pip command issue.

* add path to openpilot_env.sh for mac
old-commit-hash: a87190342b
commatwo_master
eFini 3 years ago committed by GitHub
parent 0c26c21c9c
commit 22ea8f17c2
  1. 1
      tools/mac_setup.sh
  2. 16
      tools/openpilot_env.sh

@ -61,6 +61,7 @@ fi
# install python # install python
PYENV_PYTHON_VERSION=$(cat $OP_ROOT/.python-version) PYENV_PYTHON_VERSION=$(cat $OP_ROOT/.python-version)
PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
pyenv install -s ${PYENV_PYTHON_VERSION} pyenv install -s ${PYENV_PYTHON_VERSION}
pyenv rehash pyenv rehash
eval "$(pyenv init -)" eval "$(pyenv init -)"

@ -1,16 +1,16 @@
if [ -z "$OPENPILOT_ENV" ]; then if [ -z "$OPENPILOT_ENV" ]; then
export PYTHONPATH="$HOME/openpilot:$PYTHONPATH" export PYTHONPATH="$HOME/openpilot:$PYTHONPATH"
export PATH="$HOME/.pyenv/bin:$PATH"
# Pyenv suggests we place the below two lines in .profile before we source
# .bashrc, but there is no simple way to guarantee we do this correctly
# programmatically across heterogeneous systems. For end-user convenience,
# we add the lines here as a workaround.
# https://github.com/pyenv/pyenv/issues/1906
export PYENV_ROOT="$HOME/.pyenv"
unamestr=`uname` unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then if [[ "$unamestr" == 'Linux' ]]; then
export PATH="$HOME/.pyenv/bin:$PATH"
# Pyenv suggests we place the below two lines in .profile before we source
# .bashrc, but there is no simple way to guarantee we do this correctly
# programmatically across heterogeneous systems. For end-user convenience,
# we add the lines here as a workaround.
# https://github.com/pyenv/pyenv/issues/1906
export PYENV_ROOT="$HOME/.pyenv"
eval "$(pyenv init --path)" eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)" eval "$(pyenv virtualenv-init -)"

Loading…
Cancel
Save