$ sudo echo "Defaults env_keep=\"PATH PYTHONPATH LD_LIBRARY_PATH CAFFE_ROOT\"" >> /etc/sudoers
$ sudo sed -i -e "s/^\(Defaults secure_path.*\)$/# \1/" /etc/sudoers
$ sudo -E -H command