0

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."

...

peu ping
  • 399
  • 1
  • 6
  • 14

1 Answers1

0

There were 2 version of Python installed on this system.

Different environment was invoking a different version of python, which did not have psyco.

peu ping
  • 399
  • 1
  • 6
  • 14