Error to install metawear package [Ubuntu 20.04]

edited February 2022 in Python

Hi,
I'm new to programming and I'm following the python developer tutorial (https://mbientlab.com/tutorials/PyLinux.html) on OS Ubuntu 20.04. I'm using miniconda to create an environment with python 3.6 (but I also tried it with python 3.7 too). All the steps in the tutorial go well, but when I try to install the "metawear" package, an error pops up that I can't solve. I think maybe this is because of python's PATH, but I haven't found a solution for this. Has anyone gone through a similar situation?

The error is too long, so I put it in a shared document: https://docs.google.com/document/d/1MHlsBN5FsX9BPq3s-wOt1S7WvMQlWFnL3eGvIB9VGfk/edit?usp=sharing

The main error messages:
ERROR: Failed building wheel for warble
Running setup.py clean for warble
Failed to build warble
Installing collected packages: warble, requests, pyserial, metawear
Running setup.py install for warble ... error
ERROR: Command errored out with exit status 1:
command: /home/smi2011/miniconda3/envs/p36/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2fressyn/warble_31a3fcaeec8046db9ed59c8e7332e7d0/setup.py'"'"'; file='"'"'/tmp/pip-install-2fressyn/warble_31a3fcaeec8046db9ed59c8e7332e7d0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-kdgljgkd/install-record.txt --single-version-externally-managed --compile --install-headers /home/smi2011/miniconda3/envs/p36/include/python3.6m/warble

ERROR: Command errored out with exit status 1: /home/smi2011/miniconda3/envs/p36/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2fressyn/warble_31a3fcaeec8046db9ed59c8e7332e7d0/setup.py'"'"'; file='"'"'/tmp/pip-install-2fressyn/warble_31a3fcaeec8046db9ed59c8e7332e7d0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-kdgljgkd/install-record.txt --single-version-externally-managed --compile --install-headers /home/smi2011/miniconda3/envs/p36/include/python3.6m/warble Check the logs for full command output.
$

Comments

  • @eletromago

    At the very least it looks like the system bluetooth libraries are missing -- one of the errors deep in the log is that it cannot find bluetooth/bluetooth.h.

    Please try running these commands on your system to install all of the OS dependencies, and see if that fixes the pip install.

    sudo apt update
    sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev
    sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libboost-all-dev build-essential

Sign In or Register to comment.