pkg_resources.DistributionNotFound: The 'rospkg==1.2.3' distribution was not found and is required by the application
When is run 'roscore' command in my terminal, I get an error:
.. logging to /home/rahul/.ros/log/1676e6fa-abd6-11ea-8f43-70c94eedebaf/roslaunch-rahul-ubuntu-18-384.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. Traceback (most recent call last): File "/home/rahul/.local/bin/rosversion", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3088, in <module> @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3072, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 576, in _build_master return cls._build_from_requirements(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 589, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 778, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'rospkg==1.2.3' distribution was not found and is required by the application RLException: Invalid tag: Cannot load command parameter [rosversion]: command [['rosversion', 'roslaunch']] returned with code [1]. Param xml is param command="rosversion roslaunch" name="rosversion" /> The traceback for the exception was written to the log file
I'm running ROS melodic on Ubuntu 18.04. Kernel version: Linux 5.3.0-59-generic x86_64
This is what I get when I run 'printenv | grep ROS':
ROS_ETC_DIR=/opt/ros/melodic/etc/ros ROS_ROOT=/opt/ros/melodic/share/ros ROS_MASTER_URI=http://localhost:11311 ROS_VERSION=1 ROS_PYTHON_VERSION=2 ROS_PACKAGE_PATH=/home/rahul/Desktop/edx_ws/src:/opt/ros/melodic/share ROSLISP_PACKAGE_DIRECTORIES=/home/rahul/Desktop/edx_ws/devel/share/common-lisp ROS_DISTRO=melodic
I did 'pip install rospkg'. Even after installation I get the same error.
I'm a beginner in ROS. Thank you for your time.
Hey there, I have the same problem on armhf Debian 10 for ROS2 Foxy.
pip3 install rospkg
tells me that the package is already the latest version
apt install python-rospkg
tells me it can't find the package with:"E: Failed to fetch http://ftp.us.debian.org/debian/pool/... 404 Not Found"
Am I guessing correctly that there are no debian packages for armhf available for python-rospkg?
I cross compiled ros2 myself for this armhf Debian 10..
Any help would be greatly appreciated.
Thank you
can you try
apt install python3-rospkg
? The ros2 distributions rely on python3.