filipporomani / whatsapp-python

Open source Python wrapper for the WhatsApp Cloud API.
https://pypi.org/project/whatsapp-python/
MIT License
82 stars 15 forks source link

[BUG] Pip install error #16

Closed blmayer closed 10 months ago

blmayer commented 10 months ago

I get the following error when trying to install it using python 3.11:

Collecting whatsapp-python
  Using cached whatsapp-python-3.0.1.tar.gz (6.4 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-1wjse775/whatsapp-python_2858b75d696342c0802f0198df859a12/setup.py", line 3, in <module>
          from constants import VERSION
      ModuleNotFoundError: No module named 'constants'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

To Reproduce Steps to reproduce the behavior:

  1. Run pip install whatsapp-python inside a venv

Expected behavior A successful installation.

Desktop (please complete the following information):

filipporomani commented 10 months ago

I'll release a fix for this in a couple of hours. Sorry for the inconvenience and thanks for reporting this! 😀

filipporomani commented 10 months ago

Well well, now I get almost the same error but with the requests module. You can install whatsapp-python directly via github until I manage to solve this issue, I'm sorry for that.

filipporomani commented 10 months ago

I'm looking for a fix for this. Meanwhile, you can install the package from the test pypi repo using the following command: pip3 install -i https://test.pypi.org/simple/ whatsapp-python==3.0.2.post1

blmayer commented 10 months ago

Cool! Thanks for your quick fix!