Description of problem: We have a custom ROS Fuerte which uses python-rospkg. Running roscore fails with: Traceback (most recent call last): File "/opt/ros/fuerte/bin/roscore", line 4, in <module> import pkg_resources File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2793, in <module> working_set.require(__requires__) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 673, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 576, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: argparse The problem must have occured recently with some update. We have machines not udpated for a few weeks (due to a custom installed package preventing the upgrade) which work. Recently upgraded machines fail. We could not track down the actual package causing the problem. The problem can be fixed by removing "argparse" from /usr/lib/python2.7/site-packages/rospkg-1.0.27-py2.7.egg-info/requires.txt. I guess this needs to be fixed in setup.py or so in the source package. Googling a bit (and also looking in bugzilla) it seems that a previously existing python-argparse has been rolled into python-libs. Version-Release number of selected component (if applicable): python-rospkg-1.0.27-1.fc20.noarch
Thanks for the BR. The stray dependency is listed in /usr/lib/python2.7/site-packages/rospkg-1.0.27-py2.7.egg-info/requires.txt, which is generated from the setup.py. Removing it from requires.txt should fix your problem temporarily. You're right about argparse, it is included in Python 2 >= 2.7 and Python 3 >= 3.2 [1], so the package dep should be removed from the requires.txt in Fedora. I think we'll need to make a conditionally applied patch, because el6 has Python 2.6, where it is not yet integrated. Overall, I think a dep should be added on python-argparse, which is provided by the python package in Fedora. Does this sound like a good plan, Rich? Thanks, --scott [1] https://pypi.python.org/pypi/argparse/1.2.1
Yeah, this is similar to the issue with bloom that we fixed in #1084865. I agree that a patch to remove argparse from setup.py in !el6, and the addition of Requires: python-argparse as per the setup.py install_requires should take care of this issue. I'll also scan through the rest of the ROS python packages to make sure there aren't any other ones that require argparse in setup.py.
python-rospkg-1.0.28-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/python-rospkg-1.0.28-1.fc20
Tested with python-rospkg-1.0.28-1.fc20,the Requires for argparse is added
Package python-rospkg-1.0.28-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-rospkg-1.0.28-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-5326/python-rospkg-1.0.28-1.fc20 then log in and leave karma (feedback).
python-rospkg-1.0.28-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.