Okay, here is a copy of the error message I was getting from Google Collaboratory while trying to install pipenv:
WARNING: The script virtualenv is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script virtualenv-clone is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts pipenv and pipenv-resolver are installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Since I wasn't really sure what these warnings meant, I ran the pipenv install command anyway:
!pipenv install requests
This resulted in an error message basically saying the the command pipenv could not be found.
I don't have any experience setting path variables in Colab or from the command line for that matter, so I reviewed the following stackoverflow question from another user [link]: How can I insert path (environmental variable) for geckodriver in goggle colab? to try and get an idea of how to go about it. After reviewing it, I ran the following command:
!cp /root/.local/bin /usr/local
This resulted in an auto comment:
cp: -r not specified; omitting directory '/root/.local/bin'
As I said before, I don't have any experience with setting system variables from command line, and everything I've every read about it comes with a warning saying something like: failure to do it properly can permanently damage your machine. So I was hesitant to just tack on the "-r" flag.
After doing a web search I found a good explanation of the -r (recursive copy) flag from this site [link]:https://superuser.com/questions/839719/why-is-r-recursive-necessary-when-copying-a-directory-in-linux/839749 and I ran the following command:
!cp -r /root/.local/bin /usr/local
This ran without incident and I called:
!pipenv install requests
Success! It ran without incident.
Since I want to save my results from the script I'm writing, I had previously mounted a virtual drive using:
from google.colab import drive
from google.colab import files
drive.mount('/content/drive')
I also created a new directory in my google drive to hold this script and any future data files etc... I was not in the directory when I ran the above code and I don't know if that will be a problem. I'm not really familiar with Python and its virtual environments. If anyone does know if this will be an issue, please feel free to message me. Thank you to everyone who read this question and attempted to answer, or even contemplated what the answer could be.