ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Python inconsistency between deb and install space [closed]

asked 2014-07-25 12:44:03 -0500

updated 2014-07-25 14:00:04 -0500

I was having a problem with install space for rosh where it couldn't import anything from rosh.impl, so following rospy's example, I updated the setup.py to look like packages=['rosh', 'rosh.impl']. This fixed the install space issue, but now when running from the debs, rosh.impl can't be imported anymore. What's the correct configuration that will work in install space and debs?

For reference, package.xml, CMakeLists.txt, setup.py.

Edit 2: I thought I had done a release since adding rosh.impl to packages, but apparently I had not. That is almost certainly where the inconsistency is coming from.

Edit: In both non-working cases, rosh.impl can't be imported because impl doesn't exist in dist-packages/rosh.

Traceback:

import rosh.plugin
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-7e3593b021bb> in <module>()
----> 1 import rosh.plugin

/opt/ros/hydro/lib/python2.7/dist-packages/rosh/__init__.py in <module>()
     57 latching = True
     58 
---> 59 import rosh.plugin
     60 import rosh.impl.ros_packages
     61 import rosh.impl.ros_graph

/opt/ros/hydro/lib/python2.7/dist-packages/rosh/plugin.py in <module>()
     35 import roslib
     36 import roslib.packages
---> 37 from rosh.impl.exceptions import ROSHException, InvalidPlugin, NoPlugin
     38 
     39 # TODO: possibly store other data in here, like plugin help, etc...

ImportError: No module named impl.exceptions

Getting rid of the requires=... doesn't seem to have any effect for install space. Both catkin_make install and running python setup.py build manually doesn't even issue a warning/error either way.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Dan Lazewatsky
close date 2014-07-25 14:00:30.004881

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-25 13:14:20 -0500

William gravatar image

updated 2014-07-25 13:14:52 -0500

Why does it not import in deb, does it not exist or does it not import because its dependencies are missing?

I would think this line is wrong in your setup.py:

https://github.com/OSUrobotics/rosh_c...

The requires field is not used in debian packaging because we capture the dependencies with package.xml and convert those into debian dependencies. And in fact rospy and std_msgs cannot be installed with pip, so I don't think that makes sense.

I found some documentation which seemed to suggest this was an option you should provide, but I believe this is wrong, so I updated it:

http://wiki.ros.org/rospy_tutorials/T...

I'm not sure if this is the root of your issue, but I would remove the requires=... line from your setup.py.

It would be helpful if you could give more details, by editing your original question, about why it cannot be imported from the debian, like a traceback.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-07-25 12:44:03 -0500

Seen: 125 times

Last updated: Jul 25 '14