I am running some Python scripts in Google's Colaboratory platform. Now, I need to set some environment variables of the system. Like the following shows:
!export PATH=drive/app/tf-models-fork/research;drive/app/tf-models-fork/research/object_detection;drive/app/tf-models-fork/research/slim;$PATH
I tried to add the location to the variable PATH. However, I am getting the following errors:
/bin/sh: 1: drive/app/tf-models-fork/research/object_detection: Permission denied
/bin/sh: 1: drive/app/tf-models-fork/research/slim: Permission denied
/bin/sh: 1: drive/app/tf-models-fork/research: Permission denied
Is there any way to set the environment variables in this platform?
Colab now has a variable inspector to give you more insights into what your code is doing while executing. More information on this and the status bar at github.com/googlecolab/co….
I normally set the PATH
with os.environ
, like this:
import os
os.environ['PATH'] += ":/usr/local/go/bin"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With