roboticslab-uc3m / yarp-devices

A place for YARP devices
https://robots.uc3m.es/yarp-devices/
9 stars 7 forks source link

Setup.py script crashes on install #174

Closed PeterBowman closed 6 years ago

PeterBowman commented 6 years ago

Upon sudo make install (might need to run this several times):

running install
Checking .pth file support in /usr/local/lib/python3.5/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.5/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing entry points to yarp_devices.egg-info/entry_points.txt
writing dependency_links to yarp_devices.egg-info/dependency_links.txt
writing yarp_devices.egg-info/PKG-INFO
writing top-level names to yarp_devices.egg-info/top_level.txt
writing requirements to yarp_devices.egg-info/requires.txt
reading manifest file 'yarp_devices.egg-info/SOURCES.txt'
writing manifest file 'yarp_devices.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/GrabberControls2Gui
copying build/lib/GrabberControls2Gui/__init__.py -> build/bdist.linux-x86_64/egg/GrabberControls2Gui
creating build/bdist.linux-x86_64/egg/GrabberControls2Gui/templates
copying build/lib/GrabberControls2Gui/templates/GrabberControls2GuiGUI.ui -> build/bdist.linux-x86_64/egg/GrabberControls2Gui/templates
copying build/lib/GrabberControls2Gui/run.py -> build/bdist.linux-x86_64/egg/GrabberControls2Gui
copying build/lib/GrabberControls2Gui/GrabberControls2GuiGUI.py -> build/bdist.linux-x86_64/egg/GrabberControls2Gui
copying build/lib/GrabberControls2Gui/GrabberControls2GuiBackend.py -> build/bdist.linux-x86_64/egg/GrabberControls2Gui
byte-compiling build/bdist.linux-x86_64/egg/GrabberControls2Gui/__init__.py to __init__.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/GrabberControls2Gui/run.py to run.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/GrabberControls2Gui/GrabberControls2GuiGUI.py to GrabberControls2GuiGUI.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/GrabberControls2Gui/GrabberControls2GuiBackend.py to GrabberControls2GuiBackend.cpython-35.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying yarp_devices.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying yarp_devices.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying yarp_devices.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying yarp_devices.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying yarp_devices.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying yarp_devices.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
GrabberControls2Gui.__pycache__.GrabberControls2GuiGUI.cpython-35: module references __file__
creating 'dist/yarp_devices-0.0.3-py3.5.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing yarp_devices-0.0.3-py3.5.egg
removing '/usr/local/lib/python3.5/dist-packages/yarp_devices-0.0.3-py3.5.egg' (and everything under it)
creating /usr/local/lib/python3.5/dist-packages/yarp_devices-0.0.3-py3.5.egg
Extracting yarp_devices-0.0.3-py3.5.egg to /usr/local/lib/python3.5/dist-packages
yarp-devices 0.0.3 is already the active version in easy-install.pth
Installing grabbercontrols2gui script to /usr/local/bin

Installed /usr/local/lib/python3.5/dist-packages/yarp_devices-0.0.3-py3.5.egg
Processing dependencies for yarp-devices==0.0.3
Searching for pyside==1.2.2
Reading https://pypi.python.org/simple/pyside/
Best match: PySide 1.2.2
Downloading https://pypi.python.org/packages/b4/7b/2fc9d9e5c651c1550362d87bc4ab4cfe5368b312c1eaf477b5a4be708abd/PySide-1.2.2.tar.gz#md5=c45bc400c8a86d6b35f34c29e379e44d
Processing PySide-1.2.2.tar.gz
Writing /tmp/easy_install-3ympcuu8/PySide-1.2.2/setup.cfg
Running PySide-1.2.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3ympcuu8/PySide-1.2.2/egg-dist-tmp-gnro6yr4
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 243, in run_setup
    DirectorySandbox(setup_dir).run(runner)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 273, in run
    return func()
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 242, in runner
    _execfile(setup_script, ns)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-3ympcuu8/PySide-1.2.2/setup.py", line 89, in <module>
  File "/tmp/easy_install-3ympcuu8/PySide-1.2.2/utils.py", line 10, in <module>
  File "/tmp/easy_install-3ympcuu8/PySide-1.2.2/popenasync.py", line 26, in <module>
AttributeError: module 'subprocess' has no attribute 'mswindows'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bartek/roboticslab/yarp-devices/build/setup.py", line 17, in <module>
    entry_points={'gui_scripts': 'grabbercontrols2gui = GrabberControls2Gui.run:main.start'} # See https://pypi.python.org/pypi/begins/0.8#entry-points
  File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 117, in do_egg_install
    cmd.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 414, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 644, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 695, in install_item
    self.process_distribution(spec, dist, deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 740, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 826, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
    return installer(requirement)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 663, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 693, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 873, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1101, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1087, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 246, in run_setup
    raise
  File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 243, in run_setup
    DirectorySandbox(setup_dir).run(runner)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 273, in run
    return func()
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 242, in runner
    _execfile(setup_script, ns)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-3ympcuu8/PySide-1.2.2/setup.py", line 89, in <module>
  File "/tmp/easy_install-3ympcuu8/PySide-1.2.2/utils.py", line 10, in <module>
  File "/tmp/easy_install-3ympcuu8/PySide-1.2.2/popenasync.py", line 26, in <module>
AttributeError: module 'subprocess' has no attribute 'mswindows'
PeterBowman commented 6 years ago

Related upstream issue: https://github.com/pyside/PySide/issues/128.

Note that: ATTENTION: This project is deprecated, please refer to PySide2 (disclaimer at PySide's repo description).

https://github.com/roboticslab-uc3m/yarp-devices/blob/1ca4bf69c1b25dd4ab910f212d68f1fec2cf5e20/cmake/templates/setup.py.in#L16

Same version as sudo apt install python3-pyside (1.2.2).

PeterBowman commented 6 years ago

Latest PySide v1 release is 1.2.4 (Oct 14, 2015). Output:

only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
error: Setup script exited with 1

I run Python 3.5.2 (Ubuntu xenial).

PeterBowman commented 6 years ago

BTW let's take a look at Python dependencies for Travis builds. Per https://travis-ci.org/roboticslab-uc3m/yarp-devices/jobs/353962520#L2646:

Traceback (most recent call last):
  File "/home/travis/build/roboticslab-uc3m/yarp-devices/build/setup.py", line 3, in <module>
    from setuptools import setup
ImportError: No module named 'setuptools'
PeterBowman commented 6 years ago

Added check for disabling grabbercontrols2gui app if Python version found on system is greater than 3.4: https://github.com/roboticslab-uc3m/yarp-devices/commit/b6fe2b9ec1584b4c3d01a5776590bb94eec7d96e.

PeterBowman commented 6 years ago

I'm going to close this issue since the original bug was solved long ago. The offending app could be improved to support Python 3.5 or later, in which case check all errors and suggestions reported here (@David-Estevez). Also, I'm not touching /doc/specific-dependencies.csv - CMake will warn about the version mismatch.