[英]Problem launching working .sh script in cron using python, tensorflow
I have a working script.sh python /opt/facenet/src/train.py
. 我有一个正在工作的script.sh
python /opt/facenet/src/train.py
。 When I try to launch it in cron I get this error: ImportError: No module named tensorflow
. 当我尝试在cron中启动它时,出现以下错误:
ImportError: No module named tensorflow
。 I've tried this solution to find tensorflow location like this: import tensorflow tensorflow.__file__ /home/user/anaconda3/lib/site-packages/tensorflow/__init__.pyc
So I've changed the path to the libraries, executed like this: /home/user/anaconda3/lib/site-packages /opt/facenet/src/train.py
and got the following mistake: /home/user/anaconda3/lib/site-packages: Permission denied
. 我已经尝试过这种解决方案来找到这样的tensorflow位置:
import tensorflow tensorflow.__file__ /home/user/anaconda3/lib/site-packages/tensorflow/__init__.pyc
因此,我更改了库的路径,如下: /home/user/anaconda3/lib/site-packages /opt/facenet/src/train.py
并出现以下错误: /home/user/anaconda3/lib/site-packages: Permission denied
。 I tried to fix it in many ways: chmod x+u and so on. 我试图通过多种方式修复它:chmod x + u等。 But I still get the same mistake.
但是我仍然遇到同样的错误。 Any ideas on how to fix it?
关于如何解决它的任何想法?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.