I tried several ways but never succeeded. I need to change the directory in digital ocean (/home/vagrant
). I have files saved in the same folder as where the file.py file is. file.py and other files that file.py aims to execute are all in /folder/PH/Programs
. When I ran $python file.py
, it appeared an error of the directory:
os.chdir('/folder/PH/Programs')
OSError: [Errno 2] No such file or directory: '/folder/PH/Programs'