sudo python takeSpeech.py
I get the following error:
Traceback (most recent call last):
File "takeSpeech.py", line 11, in <module>
import wolframalpha
ImportError: No module named wolframalpha
Here's the code up until that point:
Code: Select all
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import Counter
import time
import serial
from subprocess import Popen, PIPE, STDOUT
import os
import signal
import urllib
import urllib2, json
import wolframalphapi@raspberrypi ~ $ sudo find / -name wolframalpha
/home/pi/.local/lib/python2.7/site-packages/wolframalpha-1.0.2-py2.7.egg/wolframalpha
pi@raspberrypi ~ $ ls -ld /home/pi/.local/lib/python2.7/site-packages/wolframalpha-1.0.2-py2.7.egg/wolframalpha
drwxr-xr-x 2 pi pi 4096 Jun 17 03:05 /home/pi/.local/lib/python2.7/site-packages/wolframalpha-1.0.2-py2.7.egg/wolframalpha
running the script DOES work with "sudo -E takeSpeech.py", however I'm adding this to an file in init.d which is automatically calling the python script using "sudo". Does anyone happen to know what I may need to change to get this working?
