Cron python script import error -


i'm trying execute python script on boot. script runs fine in shell, when boot got import error zmq package, here's cronlog:

traceback (most recent call last):   file "/home/elachere/documents/mg_app/r_server.py", line 7, in <module>     import zmq importerror: no module named zmq 

i saw many posts this, far tried :

-exports pythonpath in bash_profile , run python script via bash script

-add these lines python script (before zmq import):

#!/usr/bin/python import sys sys.path.append('/home/elachere/.local/lib/python2.7/site-packages/zmq/') 

-set pythonpath @ top of crontab

unfortunately nothing worked, still import error. in advance response.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -