0

I'm trying to download and install the cwiid package with extension for the Raspberry Pi 3B+. But I keep getting this error.

pi@raspberrypi:~ $ sudo pip3 install cwiid
Collecting cwiid
  Downloading https://files.pythonhosted.org/packages/fa/e8/d0f03c60bbdc583a7fa37a126e9b20055fb3752861820c25bd212dc62756/cwiid-3.0.0.tar.gz
Building wheels for collected packages: cwiid
  Running setup.py bdist_wheel for cwiid ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pr2tdgci/cwiid/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpawo66t7jpip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_ext
  building 'cwiid' extension
  creating build
  creating build/temp.linux-armv7l-3.5
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c cwiidmodule.c -o build/temp.linux-armv7l-3.5/cwiidmodule.o
  cwiidmodule.c:27:19: fatal error: cwiid.h: No such file or directory
   #include <cwiid.h>
                     ^
  compilation terminated.
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for cwiid
  Running setup.py clean for cwiid
Failed to build cwiid
Installing collected packages: cwiid
  Running setup.py install for cwiid ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pr2tdgci/cwiid/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3twbm9c7-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'cwiid' extension
    creating build
    creating build/temp.linux-armv7l-3.5
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c cwiidmodule.c -o build/temp.linux-armv7l-3.5/cwiidmodule.o
    cwiidmodule.c:27:19: fatal error: cwiid.h: No such file or directory
     #include <cwiid.h>
                       ^
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pr2tdgci/cwiid/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3twbm9c7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-pr2tdgci/

Any ideas what I'm doing wrong? I did research the topic and found some chat on github about the Python 3 extension but it covers a different error message.

Edit: I have run sudo apt-get install libcwiid1 libcwiid1-dev before the pip command but got the following error message

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libcwiid1-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libcwiid-dev

E: Package 'libcwiid1-dev' has no installation candidate

I assume this is were the original problem comes from?

Aileen
  • 73
  • 1
  • 7

1 Answers1

3

It looks like you are missing the cwiid headers. Try installing them using

sudo apt-get install libcwiid1 libcwiid1-dev

and rerun your pip3 command.

jmd_dk
  • 12,125
  • 9
  • 63
  • 94
  • I did run those before trying pip. Just put the error message I got for them in the original post – Aileen Jun 24 '19 at 14:20
  • 1
    What if you replace `libcwiid1-dev` by `libcwiid-dev`? – jmd_dk Jun 24 '19 at 14:24
  • It did run the fine with **libcwiid-dev** thanks! Now I have another problem that has been mentioned here https://github.com/azzra/python3-wiimote/issues/7 but I don't understand how I can change the lines like it was suggested – Aileen Jun 24 '19 at 14:37