Reputation: 399
Why does importing psyco work when I call my script directly, but when I call it from a bash script it fails???
test.sh:
while true
do
python test.py;
sleep 10;
done
test.py:
try:
import psyco
print "Got psyco!"
except ImportError:
print "No psyco."
And now...
> python test.py
"Got psyco!"
> ./test.sh
"No psyco."
"No psyco."
...
Upvotes: 0
Views: 411
Reputation: 399
There were 2 version of Python installed on this system.
Different environment was invoking a different version of python, which did not have psyco.
Upvotes: 0