Currently using AWS to run some tests on a machine learning project. I would like to run Python scripts without internet (via root) because the internet bandwidth is extremely limited. I try to run the convnets.py script by doing
sudo python convnets.py >> output
But that does not work, as Anaconda does not use PYTHONPATH, making it impossible for root to find the Anaconda Python environment. So errors like "cannot import" and "module not found" are thrown.
How do I set this up so I can get Anaconda and sudo to play fair together?
python
is pointing to Anaconda's python? Chances are that it is not sincesudo
has a differentPATH
. Trysudo /path/to/anaconda/bin/python convnets.py
– Wilkey