jasperproject / jasper-client

Client code for Jasper voice computing platform
MIT License
4.53k stars 1.01k forks source link

ImportError: No module named req #680

Open CompSciCardwell opened 6 years ago

CompSciCardwell commented 6 years ago

When trying to run Jasper on my Raspberry Pi B+ I get the following error

Traceback (most recent call last):
  File "./jasper.py", line 12, in <module>
    from client import tts
  File "/home/pi/jasper/client/tts.py", line 41, in <module>
    import diagnose
 File "/home/pi/jasper/client/diagnose.py", line 9, in <module>
    import pip.req
ImportError: No module named req

I'm tried reinstalling pip but that doesn't fix it. Any help?

ZenyoXos commented 6 years ago

change your pip version : sudo python -m pip install --upgrade pip==9.0.3

pavlyknet commented 6 years ago

@ZenyoXos thanks for help

netzulo commented 6 years ago

just... workaround :)

Do this to get working like a charm!

  1. create a directory pip/
  2. add an empty file pip/init.py
  3. add a file pip/req.py
  4. put the code above into pip/req.py:
# package pip.req.py
def parse_requirements(filename):
    """ load requirements from a pip requirements file """
    lineiter = (line.strip() for line in open(filename))
    return [line for line in lineiter if line and not line.startswith("#")]
himondas18 commented 6 years ago

just... workaround :)

Do this to get working like a charm!

  1. create a directory pip/
  2. add an empty file pip/init.py
  3. add a file pip/req.py
  4. put the code above into pip/req.py:
# package pip.req.py
def parse_requirements(filename):
    """ load requirements from a pip requirements file """
    lineiter = (line.strip() for line in open(filename))
    return [line for line in lineiter if line and not line.startswith("#")]

where should i create the directory?

nodueck commented 5 years ago

change your pip version : sudo python -m pip install --upgrade pip==9.0.3

Doesn't work:

pip --version
pip 9.0.3 from /home/nodueck/.local/lib/python3.7/site-packages (python 3.7)
Traceback (most recent call last):
  File "/usr/share/jasper-voice-control/jasper.py", line 12, in <module>
    from client import tts
  File "/usr/share/jasper-voice-control/client/tts.py", line 41, in <module>
    import diagnose
  File "/usr/share/jasper-voice-control/client/diagnose.py", line 9, in <module>
    import pip.req
ImportError: No module named req

I'm using Arch-Linux btw. (5.1.12-arch1-1-ARCH)

yaourt -S jasper-voice-control-git
yaourt -S jasper-plugins
nodueck commented 5 years ago

In ArchLinux python is the default for python3. sudo python2 -m pip install --upgrade pip==9.0.3 solved this for me