Jasper not running, asking for a package that is already there

96 views
Skip to first unread message

Posin Mark

unread,
Jul 5, 2016, 8:37:32 PM7/5/16
to Jasper Support Forum
Using Ubuntu MATE on Raspberry Pi 2, running /home/ilya/jasper/jasper.py returns (note the name of my Pi is ilya instead of pi):

Traceback (most recent call last):
  File "/home/ilya/jasper/jasper.py", line 12, in <module>
    from client import tts, stt, jasperpath, diagnose
  File "/home/ilya/jasper/client/tts.py", line 20, in <module>
    import requests
ImportError: No module named requests

Requests is already installed:
https://gyazo.com/187d3d3ab7692ac64a70c52be4697506

Trying to install requests with pip or easy_install just says that the package is up-to-date.
From sudo pip install requests:
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/local/lib/python2.7/dist-packages
From sudo easy_install requests:
Adding requests 2.10.0 to easy-install.pth file

Using /usr/local/lib/python2.7/dist-packages
Processing dependencies for requests
Finished processing dependencies for requests

I have tried to fix this problem for a LONG time now. Removed pip and installed it countless times, removed and reinstalled requests countless times as well. I tried to install requests manually using python setup.py, which did not work either. I feel that I am out of options. I have followed the steps and ensured that every other package/dependency was installed. If anyone could help me that would be great. If you need anymore information, I would be more than willing to give it to you.


Posin Mark

unread,
Jul 6, 2016, 1:05:51 AM7/6/16
to Jasper Support Forum
Nevermind. After digging around for a while, I fixed this issue by adding /usr/lib/python2.7/dist-packages/ to python's sys.path, since python did not have that path to check the installed modules. I've run into a different issue now. When running /home/ilya/jasper/jasper.py, I get the message "Please build and install the PortAudio Python bindings first." I downloaded the git for pyaudio and it is now located in /home/ilya/pyaudio. The issue is that when I run it using the command in the terminal "python setup.py install", I end up with a bunch of errors.

running install

Traceback (most recent call last):
  File "setup.py", line 122, in <module>
    extra_link_args=extra_link_args)
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 103, in do_egg_install
    cmd.ensure_finalized()  # finalize before bdist_egg munges install cmd
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 289, in finalize_options
    'install_lib', ('install_dir', 'install_dir')
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 298, in set_undefined_options
    src_cmd_obj.ensure_finalized()
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 17, in finalize_options
    self.set_undefined_options('install',('install_layout','install_layout'))
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 302, in set_undefined_options
    getattr(src_cmd_obj, src_option))
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 105, in __getattr__
    raise AttributeError, attr
AttributeError: install_layout

If anyone that has experience installing pyaudio could help me, that would be great!

Flo Amok

unread,
Jul 6, 2016, 4:59:37 AM7/6/16
to Jasper Support Forum
i remember i had setup jasper-dev branch on mate but ran into exotic problems similar to yours. once i fixed one another appeared. 
i gave up, started from scratch with raspbian without any problems.
but keep in mind a desktop will always cause some problems. that's why the images in this forum come without a desktop.
i don't say it is impossible, i need one for my dashboard.

Matthew Curry

unread,
Jul 6, 2016, 1:48:05 PM7/6/16
to Jasper Support Forum
Also, please use my image...

I made it for a reason.  There are 3+ ways to manage python; and the error you are seeing is usually caused by that.

First: use our image
2nd: if you can't, use our image prep script in the tools repo.  It will remove you desktop...

Matthew Curry

unread,
Jul 6, 2016, 4:58:30 PM7/6/16
to Jasper Support Forum
Message me in slack and I will show you how to get around this error.
Reply all
Reply to author
Forward
0 new messages