diff --git a/dotfiles/zsh/.env b/dotfiles/zsh/.env index abdbe8b..b82136c 100644 --- a/dotfiles/zsh/.env +++ b/dotfiles/zsh/.env @@ -56,12 +56,18 @@ if [ -z "$VIRTUALENVWRAPPER_PYTHON_VERSION" ]; then export VIRTUALENVWRAPPER_PYTHON_VERSION=3.10 fi +if [ -z "$MAIN_PYTHON_VERSION" ]; then + export MAIN_PYTHON_VERSION=3.10 +fi + if [[ $(uname -s) == 'Darwin' ]]; then for py_version in {"3.6","3.8","3.10"}; do prepend_path "/Library/Frameworks/Python.framework/Versions/${py_version}/bin" done prepend_path "/Users/$USER/Library/Python/3.10/bin" + alias gpip="/Library/Frameworks/Python.framework/Versions/${MAIN_PYTHON_VERSION}/bin/pip" + TMP=/Library/Frameworks/Python.framework/Versions/${VIRTUALENVWRAPPER_PYTHON_VERSION}/bin/python${VIRTUALENVWRAPPER_PYTHON_VERSION} if [ -f $TMP ]; then export VIRTUALENVWRAPPER_PYTHON=$TMP @@ -73,6 +79,10 @@ if [[ $(uname -s) == "Linux" ]]; then if [ -f /usr/local/bin/python${VIRTUALENVWRAPPER_PYTHON_VERSION} ]; then export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python${VIRTUALENVWRAPPER_PYTHON_VERSION} fi + + if [ -f /usr/local/bin/python${MAIN_PYTHON_VERSION} ]; then + alias gpip="/usr/local/bin/python${MAIN_PYTHON_VERSION} -m pip" + fi fi if [[ $(command_exists virtualenvwrapper.sh) == true ]]; then