DFKI-NI / rospy_message_converter

Converts between Python dictionaries and JSON to ROS messages.
BSD 3-Clause "New" or "Revised" License
226 stars 101 forks source link

Installation fails with pip3 #27

Closed argenos closed 4 years ago

argenos commented 5 years ago

To reproduce this, rospkg and catkin-pkg also need to be installed to work with python3, e.g. using pip3:

$ pip3 install rospy-message-converter
Collecting rospy-message-converter
  Using cached https://files.pythonhosted.org/packages/c3/7d/5e153b0d7dea31faa4a12505ff04f26dce77716f97d963af2e165ac12984/rospy_message_converter-0.4.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-1zv7ys8z/rospy-message-converter/setup.py", line 8, in <module>
        package_dir={'' : 'src'},
      File "/usr/local/lib/python3.5/dist-packages/catkin_pkg/python_setup.py", line 74, in generate_distutils_setup
        package = parse_package(package_xml_path)
      File "/usr/local/lib/python3.5/dist-packages/catkin_pkg/package.py", line 513, in parse_package
        xml, filename = _get_package_xml(path)
      File "/usr/local/lib/python3.5/dist-packages/catkin_pkg/package.py", line 489, in _get_package_xml
        raise IOError('Path "%s" is neither a directory containing a "%s" file nor a file' % (path, PACKAGE_MANIFEST_FILENAME))
    OSError: Path "." is neither a directory containing a "package.xml" file nor a file

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-1zv7ys8z/rospy-message-converter/
mintar commented 5 years ago

I'm currently on vacation, but I'll look into this in about two weeks. Thanks for the issue!

argenos commented 5 years ago

No problem! Not sure if this is an option, but we solved it in https://github.com/ropod-project/rospy_message_converter/pull/1 by using a pyproject.toml file. This also helped us install the dependencies in the right order when in a requirements.txt file, otherwise it would fail because it couldn't find catkin_pkg (which was also listed in that file).

mintar commented 5 years ago

The pip library was made by @cjds (see #14 and #25), so any questions about that should go to him.

It's not quite easy to set up Python3 with ROS at the moment, so I'm not sure what the proper fix for this would be. Pull requests welcome.

nyxaria commented 4 years ago

is there any progress on this?

mintar commented 4 years ago

Installation via pip or pip3 is unsupported. Please ask @cjds for any questions, since he's the one who uploaded the package to pip.

You should either build from source or use the prepackaged binaries, e.g. sudo apt install ros-melodic-rospy-message-converter.

cjds commented 4 years ago

Sorry that's my bad for not noticing the first "@". I'll take a look at it right now and let you know. @mintar with noetic coming out soon it's becoming easier to do python3 things with ROS

cjds commented 4 years ago

So this fails because my release of this library is 2 years old currently. The master version of this library does work and a re-release will fix it. I will try to get that done and update when I have it

nyxaria commented 4 years ago

Thank you @cjds :)

cjds commented 4 years ago

FYI update on this so far is I'm trying to recover the account that pushed the code up (unfortunately lost my recovery method). In the meantime, one workaround is a git clone and running setup.py manually from the top of this repo. I'll update you when I recover the account and have it released

cjds commented 4 years ago

https://pypi.org/project/rospy-message-converter/ has released a new version and now should work