Sometimes `pip install --upgrade <pkg>` does not work successfully and people need to troubleshoot.
Now that package installs are written to the Terra detachable persistent disk, one approach is to delete and recreate that disk to troubleshoot BUT it's easy to forget that you have some important files on that disk, then delete it during a troubleshooting session and regret the deletion.
An alternative is to troubleshoot by starting from an empty `packages/` directory. For example, open a terminal and then run the following commands to move all currently installed packages to another directory so that they are no longer visible to pip, Python, and Jupyter:
export PKG_STASH_DIR=packages-as-of-$(date +"%Y%m%d")
# Move all the currently installed packages out of the existing destination directory for package installations.
mv packages/* $PKG_STASH_DIR
Now you can retry the `pip` commands to install the packages again!
Please sign in to leave a comment.