RE Wolfe
RE Wolfe

Reputation: 29

Library is not installed on PATH - How can I install on path?

I am running this notebook in my managed notebooks environment on Google Cloud and I'm getting the following error when trying to install the packages: "WARNING: The script google-oauthlib-tool is installed in '/home/jupyter/.local/bin' which is not on PATH. Consider adding this directory to PATH."

Here is the python code that I'm trying to run for reference. https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/model_monitoring/model_monitoring.ipynb

Any suggestions on how I can update the package installation so it is on path and resolve the error? I'm currently working on GCP user-managed notebooks on a Mac.

Thanks so much for any tips!

Upvotes: 2

Views: 1068

Answers (1)

Jacob Miller
Jacob Miller

Reputation: 754

Open up your shell config file (likely .zshrc because the default shell on Mac is now zsh and that's the name of the zsh config file) located at your home directory in a text editor (TextEdit, etc) and add the path to the executable. Like this: Open the file: open -e ~/.zshrc Edit the file: Add this line at the top (may vary, check the documentation): export PATH="/home/jupyter/.local/bin" That may not work, try this: export PATH="$PATH:/home/jupyter/.local/bin" Your best bet is to read the package documentation.

After saving the config file, run source ~/.zshrc and replace .zshrc with the config file name if it's different OR open a new terminal tab.

What this does is tells the shell that the command exists and where to find it.

Upvotes: 1

Related Questions