filipporomani/whatsapp-python

[BUG] Pip install error

Closed this issue · 4 comments

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):

  • OS: Linux archlinux 6.5.9-arch2-1 #1 SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
  • Version pip 23.3.1, python 3.11.5

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

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.

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

Cool! Thanks for your quick fix!