Switch to Python 3 as default Python installation.

parent c9e0ffef
......@@ -259,7 +259,7 @@ installBrewPackages()
printf "\n> Installing Brew packages.\n"
# Install python version 3, which `pip` is also included, as the header files are required by natively-built pip packages.
brew install python3
brew install python
# Install bash-completion. This allows us to leverage bash completion scripts installed by our brew installed packages.
brew install bash-completion
......@@ -363,6 +363,9 @@ installNodePackages ()
# Tool to configure many GitHub projects to use a given set of settings.
yarn global add @hbetts/github-metadata-sync
# Tool to run Yeoman generators for scaffolding new projects.
yarn global add yo
else
echo "ERROR: `yarn` is required for installing NodeJS packages, but it's not available in your PATH. Please install `yarn` and ensure it's in your PATH. Then re-run `installNodePackages`."
fi
......@@ -372,20 +375,20 @@ installNodePackages ()
# Install Python packages via `pip`.
installPythonPackages ()
{
if command -v pip3 &> /dev/null; then
if command -v pip &> /dev/null; then
printf "\n> Installing Python packages.\n"
# Update the version of `pip` installed in our environment.
pip3 install pip --upgrade
pip install pip --upgrade
# Required to manage virtual Python environments.
pip3 install virtualenv --upgrade
# Package and virtual environment manager for Python.
pip install pipenv --upgrade
# Configuration management tool.
pip3 install ansible --upgrade
pip install ansible --upgrade
# Shell prompt configuration and theming tool.
pip3 install powerline-status --upgrade
pip install powerline-status --upgrade
else
echo "ERROR: `pip` is required for installing Python packages, but it's not available in your PATH. Please install `pip` and ensure it's in your PATH. Then re-run `installPythonPackages`."
fi
......
......@@ -11,8 +11,7 @@
export PREFIX_DIRECTORY="${HOME}/.local"
# Add our local binary directories to our PATH. This will allow us to utilize locally installed binaries when available. Furthermore, because we prepend our local binary directory to our PATH our local binaries will be used in favor of globally-installed system binaries.
# Adding `/opt/python/libexec/` to path so that `python` points to Python 3 instead of Python 2.
export PATH="${PREFIX_DIRECTORY}/opt/python/libexec/bin:${PREFIX_DIRECTORY}/bin:${PREFIX_DIRECTORY}/sbin:${PATH}"
export PATH="${PREFIX_DIRECTORY}/bin:${PREFIX_DIRECTORY}/sbin:${PATH}"
# Add our local info page directory to our MANPATH. This will allow the `man` utility to load manual pages from our local manual directory. Furthermore, because we prepend our local manual directory to our MANPATH, our local manual pages will be used in favor of globally installed manual pages.
export MANPATH="${PREFIX_DIRECTORY}/share/man:${MANPATH:-}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment