cohere-ai / sandbox-grounded-qa

A sandbox repo for grounded question answering with Cohere and Google Search
MIT License
135 stars 17 forks source link

ModuleNotFoundError: No module named 'cohere' #3

Closed michaelwechner closed 1 year ago

michaelwechner commented 1 year ago

I followed the installation instructions and when running python3 cli_demo.py ... then I receive the following error

Traceback (most recent call last):
  File "cli_demo.py", line 13, in <module>
    from qa.bot import GroundedQaBot
  File "/Users/michaelwechner/src/sandbox-grounded-qa/qa/bot.py", line 11, in <module>
    import cohere
ModuleNotFoundError: No module named 'cohere'

whereas when I installed the dependencies (pip3 install -r requirements.txt) I received various errors:

 Building wheel for numpy (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
..
  ERROR: Failed building wheel for numpy
...
  Building wheel for pyarrow (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
...
  ERROR: Failed building wheel for pyarrow
....
  Building wheel for pillow (setup.py) ... error
  ERROR: Command errored out with exit status 1:
....
  Running setup.py clean for pillow
....
Failed to build numpy pyarrow pillow
ERROR: Could not build wheels for numpy, pyarrow which use PEP 517 and cannot be installed directly

I was running it on Mac OS Monterey 12.2.1

Python 3.8.9 pip 20.2.3

Any idea what I might have to change? Thanks for any pointers!

egrefen commented 1 year ago

That's weird. I tried it on a machine with python 3.7.x and one with 3.9.x and no problem.

From googling the errors you have, it looks like a local problem. Try running pip install --upgrade setuptools or pip3 install --upgrade setuptools, and then run pip3 install -r requirements.txt again and see if that helps...

michaelwechner commented 1 year ago

Thanks for your feedback!

I have upgrade Python now to

Python 3.10.8
pip 22.3.1

and now it works :-)