I have installed pipenv by pip3.
And it works pipenv -h in script.
But after in crontab, it's not work.
pip3 show pipenv
Location: /home/ubuntu/.local/lib/python3.6/site-packages
my cronjob21 * * * * cd /home/ubuntu/test; /bin/sh test.sh > /home/ubuntu/test.out 2>&1
test.sh
#!/bin/bash
echo "hi"
python -V
python3 -V
pipenv -h
output
hi
Python 2.7.12
Python 3.6.3
test.sh: : test.sh: pipenv: not found
how to run pipenv in cronjob in ubuntu? thanks.
Answer:
/home/ubuntu/.local/bin/pipen
Try giving the whole path.
Find which pipenv and then run with the absolute path of the same. instead of pipenv -h
In my case it was located in /usr/local/bin/pipenv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With