respeaker / respeakerd

respeakerd is the server application for the microphone array solutions of SEEED, based on librespeaker which combines the audio front-end processing algorithms.
MIT License
54 stars 24 forks source link

`setuptools_scm` dependency issue for `pyusb` #24

Open randombrein opened 3 years ago

randombrein commented 3 years ago

Expected Behavior

Following ReSpeaker Core v2.0 tutorial out-of-box-demo section, install_all.sh script should install all the necessary apt and pip packages smoothly.

Current Behavior

One line pip install command cries when setuptools_scm dependency not found for pyusb package (which is requred for pixel_ring).

...
Collecting pyusb (from pixel_ring)
  Using cached https://files.pythonhosted.org/packages/b9/8d/25c4e446a07e918eb39b5af25c4a83a89db95ae44e4ed5a46c3c53b0a4d6/pyusb-1.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
    No local packages or working download links found for setuptools_scm
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-riIqoK/pyusb/setup.py", line 117, in <module>
        'Topic :: System :: Hardware :: Hardware Drivers'
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 317, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 372, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 846, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1118, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1130, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 440, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 693, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-riIqoK/pyusb/
The respeakerd services has been started.
You can view it's log via:

sudo journalctl -f -u respeakerd
...

Steps to Reproduce (for bugs)

After the flashing boot image on the ReSpeaker Core v2.0 follow the tutorial steps on out-of-box-demo bootstrap using install_all.sh script (tried on both current lxqt images i.e. respeaker-debian-9-lxqt-sd-20180801-4gb.img and respeaker-debian-9-lxqt-flasher-20180801-4gb.img)

Your Environment (for bugs)

a) System version:

Debian GNU/Linux 9
respeaker.io Debian Image 20180801

b) librespeaker version:

librespeaker:
  Installed: 2.1.2-build190110
  Candidate: 2.1.2-build190110
  Version table:
 *** 2.1.2-build190110 500
        500 http://respeaker.seeed.io/deb stretch/main armhf Packages
        100 /var/lib/dpkg/status
     2.1.1-build181119 500
        500 http://respeaker.seeed.io/deb stretch/main armhf Packages
     2.0.0-build180720 500
        500 http://respeaker.seeed.io/deb stretch/main armhf Packages

Possible Solution

Installing setuptools_scm using pip in setup script fixes the issue. Since order of packages that pip will install is not determinant I had to write lines explicitly in following way;

# install_all.sh
...
sudo pip install avs voice-engine pydbus pulsectl setuptools_scm
sudo pip install pixel_ring