Installing YowSup library in Python

Whenever I try to install the yowsup library It always try to install readline along with the package.
The thing is, when it starts to install readline it gives an error saying:

Note: This error originates from the build backend, and is likely not a problem with poetry but with readline (6.2.4.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "readline (==6.2.4.1)"'

I tried run the command in which just gave me another error saying:

Building wheels for collected packages: readline
  Building wheel for readline (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /nix/store/lwzzgbnj41d657lpxczk6l5f7d5zcnj1-python3-3.10.11/bin/python3.10 /nix/store/s4cbcvnm0miclkjwj6g8fxcn8fgb78s1-python3.10-pip-21.2.dev0/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpckigublo
       cwd: /tmp/pip-wheel-178xsm5r/readline_eb35e295b59c420ebc00b1d67b7906cf
gcc: error: readline/libreadline.a: No such file or directory
  gcc: error: readline/libhistory.a: No such file or directory
  error: command '/nix/store/npm4g1zsj5yzygf6bq46pbi9fqhxisha-gcc-wrapper-10.3.0/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for readline
Failed to build readline
ERROR: Failed to build one or more wheels

Which leads me to the question… did anyone had any success trying to install yowsup library?
I also tried to use “poetry add” and “pip install” but no success either.

(I’m using yowsup because it allows more customization but if anyone have any hints about a WhatsApp library just as good as yowsup (and free, twillio is good but quite expensive) I’m all in)

Ran around a bit, but I found that readline needs the system package pkgs.readline, after which it’ll install fine.

Example Repl:
https://replit.com/@Firepup650/test-packages?s=app

4 Likes

If the Packages tool or autoguessing is used, then it would probably install the system dependency automatically. It’s not 100% accurate so it might not work for some packages.

The 2nd error does indicate that there is a missing library in the gcc error.

1 Like

IIRC, isn’t that manually done by staff? Regardless, poetry (the thing upm uses) hangs when trying to add yowsup for me.

1 Like

Some python packages have system dependencies, right? Which python packages have which system dependencies is determined by a JSON file linked in this topic, and it was automatically generated by checking nix python packages.
I’m not exactly sure what PEP517 errors mean, it happens sometimes.

1 Like

Readline is indeed not in that file.

Poetry doesn’t even get there, it just spins itself in circles trying to resolve dependencies.

1 Like

On a separate note (we’re staring to veer off topic here), did that fix your issue @WindLother?

1 Like

I couldn’t test the fix will try now

It worked, just need to solve the other problems now! Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.