whatsplay / whatsapp-play

Command line software through which you can play with your WhatsApp. It is having different options to play with your WhatsApp like message blast, online tracking, whatsapp chat..
MIT License
402 stars 219 forks source link

Installation from source error `ModuleNotFoundError: No module named '_ctypes'` #393

Closed aroraakshit closed 3 years ago

aroraakshit commented 3 years ago

Unable to install from requirements.txt, whaaaaat errors out with no module named '_ctypes'.

Crash dump:

$ pip install -r requirements.txt
Collecting argparse>=1.4.0 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting beautifulsoup4>=4.8.1 (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/d1/41/e6495bd7d3781cee623ce23ea6ac73282a373088fcd0ddc809a047b18eae/beautifulsoup4-4.9.3-py3-none-any.whl (115kB)
     |████████████████████████████████| 122kB 20.3MB/s
Collecting colorama>=0.4.3 (from -r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl
Collecting DateTime>=4.3 (from -r requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/73/22/a5297f3a1f92468cc737f8ce7ba6e5f245fcfafeae810ba37bd1039ea01c/DateTime-4.3-py2.py3-none-any.whl (60kB)
     |████████████████████████████████| 61kB 15.3MB/s
Collecting decorator>=4.4.2 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/ed/1b/72a1821152d07cf1d8b6fce298aeb06a7eb90f4d6d41acec9861e7cc6df0/decorator-4.4.2-py2.py3-none-any.whl
Collecting flake8>=3.7.9 (from -r requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/d4/ca/3971802ee6251da1abead1a22831d7f4743781e2f743bd266bdd2f46c19b/flake8-3.8.4-py2.py3-none-any.whl (72kB)
     |████████████████████████████████| 81kB 17.4MB/s
Collecting google>=2.0.3 (from -r requirements.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/ac/35/17c9141c4ae21e9a29a43acdfd848e3e468a810517f862cad07977bf8fe9/google-3.0.0-py2.py3-none-any.whl (45kB)
     |████████████████████████████████| 51kB 18.3MB/s
Collecting gTTS==2.1.1 (from -r requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/a1/0c/4ca77eca3b739a4a08360930643f58d714e302fee0d2f8c654e67d9af8e7/gTTS-2.1.1-py3-none-any.whl
Collecting newsapi-python>=0.2.6 (from -r requirements.txt (line 9))
  Downloading https://files.pythonhosted.org/packages/de/9e/9050199ac7cbc755d1c49577fdaa5517901124b574264b3602a8b8028440/newsapi_python-0.2.6-py2.py3-none-any.whl
Collecting phonenumbers==8.10.2 (from -r requirements.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/d9/62/a176cfaf6edb90b68ae3426cf4fb8fd98189df550e2143cafc66bb2c1b82/phonenumbers-8.10.2-py2.py3-none-any.whl (3.2MB)
     |████████████████████████████████| 3.2MB 25.4MB/s
Collecting playsound>=1.2.2 (from -r requirements.txt (line 11))
  Downloading https://files.pythonhosted.org/packages/f5/16/10d897b0a83fb4b05b03a63d7a2667ab75f857f67f7062fd447dd3f49bf7/playsound-1.2.2-py2.py3-none-any.whl
Collecting prompt_toolkit==1.0.14 (from -r requirements.txt (line 12))
  Downloading https://files.pythonhosted.org/packages/ee/3d/b25d35a9f0d381dd1c02d8e04b37c353caaaff4bc32150328eeebe4931f5/prompt_toolkit-1.0.14-py3-none-any.whl (248kB)
     |████████████████████████████████| 256kB 34.8MB/s
Collecting psutil>=5.7.0 (from -r requirements.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/84/da/f7efdcf012b51506938553dbe302aecc22f3f43abd5cffa8320e8e0588d5/psutil-5.8.0-cp37-cp37m-manylinux2010_x86_64.whl (296kB)
     |████████████████████████████████| 296kB 28.3MB/s
Collecting pycodestyle>=2.6.0 (from -r requirements.txt (line 14))
  Downloading https://files.pythonhosted.org/packages/10/5b/88879fb861ab79aef45c7e199cae3ef7af487b5603dcb363517a50602dd7/pycodestyle-2.6.0-py2.py3-none-any.whl (41kB)
     |████████████████████████████████| 51kB 17.9MB/s
Collecting pycparser>=2.20 (from -r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
     |████████████████████████████████| 112kB 33.6MB/s
Collecting pyee>=7.0.2 (from -r requirements.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/0d/0a/933b3931107e1da186963fd9bb9bceb9a613cff034cb0fb3b0c61003f357/pyee-8.1.0-py2.py3-none-any.whl
Collecting pyfiglet>=0.8.post1 (from -r requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/33/07/fcfdd7a2872f5b348953de35acce1544dab0c1e8368dca54279b1cde5c15/pyfiglet-0.8.post1-py2.py3-none-any.whl (865kB)
     |████████████████████████████████| 870kB 33.3MB/s
Collecting pyflakes>=2.2.0 (from -r requirements.txt (line 18))
  Downloading https://files.pythonhosted.org/packages/69/5b/fd01b0c696f2f9a6d2c839883b642493b431f28fa32b29abc465ef675473/pyflakes-2.2.0-py2.py3-none-any.whl (66kB)
     |████████████████████████████████| 71kB 19.2MB/s
Collecting Pygments>=2.6.1 (from -r requirements.txt (line 19))
  Downloading https://files.pythonhosted.org/packages/3a/80/a52c0a7c5939737c6dca75a831e89658ecb6f590fb7752ac777d221937b9/Pygments-2.8.1-py3-none-any.whl (983kB)
     |████████████████████████████████| 993kB 32.5MB/s
Collecting pyppeteer>=0.2.2 (from -r requirements.txt (line 20))
  Downloading https://files.pythonhosted.org/packages/4a/05/ea3250282e46fda60df1f1d5246bb8cdc022abb89969c61a98ea28fd6b82/pyppeteer-0.2.5-py3-none-any.whl (87kB)
     |████████████████████████████████| 92kB 29.4MB/s
Collecting python-dotenv>=0.12.0 (from -r requirements.txt (line 21))
  Downloading https://files.pythonhosted.org/packages/32/2e/e4585559237787966aad0f8fd0fc31df1c4c9eb0e62de458c5b6cde954eb/python_dotenv-0.15.0-py2.py3-none-any.whl
Collecting python-telegram-bot>=12.7 (from -r requirements.txt (line 22))
  Downloading https://files.pythonhosted.org/packages/0a/d4/2fe358d6ca43553c86c852990dc62242bc1bdd458f758574fdf2bb5abcc4/python_telegram_bot-13.3-py3-none-any.whl (436kB)
     |████████████████████████████████| 440kB 40.9MB/s
Collecting requests>=2.22.0 (from -r requirements.txt (line 23))
  Downloading https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl (61kB)
     |████████████████████████████████| 61kB 17.8MB/s
Collecting transitions>=0.7.2 (from -r requirements.txt (line 24))
  Downloading https://files.pythonhosted.org/packages/8a/48/98aa5e42b327d6c1704093b7ab8c153cf496857556f15d1f2f7f0dec9de1/transitions-0.8.7-py2.py3-none-any.whl (80kB)
     |████████████████████████████████| 81kB 16.1MB/s
Collecting urllib3>=1.25.8 (from -r requirements.txt (line 25))
  Downloading https://files.pythonhosted.org/packages/23/fc/8a49991f7905261f9ca9df5aa9b58363c3c821ce3e7f671895442b7100f2/urllib3-1.26.3-py2.py3-none-any.whl (137kB)
     |████████████████████████████████| 143kB 28.1MB/s
Collecting websockets>=8.1 (from -r requirements.txt (line 26))
  Downloading https://files.pythonhosted.org/packages/5a/0b/3ebc752392a368af14dd24ee041683416ac6d2463eead94b311b11e41c82/websockets-8.1-cp37-cp37m-manylinux2010_x86_64.whl (79kB)
     |████████████████████████████████| 81kB 22.2MB/s
Collecting whaaaaat>=0.5.2 (from -r requirements.txt (line 27))
  Downloading https://files.pythonhosted.org/packages/85/06/299520d293ec7a654f3b71453fee348011e6366f80cb6140181e438f6f9c/whaaaaat-0.5.2.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /home/dgxuser/akshita/temp/weird_damn/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ip_z2o1f/whaaaaat/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ip_z2o1f/whaaaaat/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-ip_z2o1f/whaaaaat/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/dgxuser/akshita/temp/weird_damn/lib/python3.7/site-packages/setuptools/__init__.py", line 20, in <module>
        from setuptools.dist import Distribution, Feature
      File "/home/dgxuser/akshita/temp/weird_damn/lib/python3.7/site-packages/setuptools/dist.py", line 35, in <module>
        from setuptools import windows_support
      File "/home/dgxuser/akshita/temp/weird_damn/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
aroraakshit commented 3 years ago

cc: @Rohan-Salwan

rpotter12 commented 3 years ago

Hi @aroraaskshit, https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul this answer will help you. You need to install libffi-dev in your system.

rpotter12 commented 3 years ago

@aroraakshit, I this will work for you.