Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named pyttsx #32

Open
nullbuddy1243 opened this issue May 20, 2015 · 3 comments
Open

No module named pyttsx #32

nullbuddy1243 opened this issue May 20, 2015 · 3 comments

Comments

@nullbuddy1243
Copy link

Hi there,

I recently installed pyttsx via pip and am getting strange behavior.

This is the command I used to globally install pyttsx using pip:
sudo pip install pyttsx
Output:

The directory '/home/deusofnull/.cache/pip/log' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/deusofnull/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/deusofnull/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyttsx
  Downloading pyttsx-1.1.tar.gz
Installing collected packages: pyttsx
  Running setup.py install for pyttsx
Successfully installed pyttsx-1.1

When I try to run my code, I am getting this error:

deusofnull@deusofnull:~/codes/random_words$ python rando-words.py 
Traceback (most recent call last):
  File "rando-words.py", line 2, in <module>
    import pyttsx
ImportError: No module named pyttsx

I'm confused because when I try to upgrade pyttsx, I get verification that it is installed and up to date:

deusofnull@deusofnull:~/codes/random_words$ pip install pyttsx --upgrade
Requirement already up-to-date: pyttsx in /usr/local/lib/python3.4/dist-packages

Is this a pip permissions issue? What is the best way to safely install pyttsx globally on Ubuntu 14.04?

Thanks!

@spreadred
Copy link

If executing pip with sudo, you may want sudo's -H flag. Did you investigate this?

@nullbuddy1243
Copy link
Author

I have. This is what I get when I run sudo with -H

deusofnull@deusofnull:~/codes/random_words$ sudo -H pip install pyttsx
[sudo] password for deusofnull: 
Requirement already satisfied (use --upgrade to upgrade): pyttsx in /usr/local/lib/python3.4/dist-packages

@channon1
Copy link

for me it only worked with python 2.7 so I used the python 2.7 pip to install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants