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

Use python rather than python3 in lots of files

asked 2021-04-15 11:54:51 -0500

fercuacho gravatar image

updated 2021-04-15 23:29:46 -0500

jayess gravatar image

I'm running Ubuntu 20.04, with kernel 5.8.0-49, and i installed ROS Noetic, as exlained:

Then, i installed Webots:

When i try to launch 'roslaunch ur_e_webots ur5e_joint_limited.launch' (NOTE: I used the package ur_e_webots. from and copied it to the srcfolder of my workspace), as explained:

Having previously installed the 'universal_robots' package, also explained in the previous link.

I got "ImportError: no module named yaml", although I check that I have python3-yaml installed. Solved the problem by install the python-yaml package. But now the launch process is stopped by:

ImportError: No module named rospkg
[webots_universal_robots-4] process has died [pid 13358, exit code 1, cmd /home/fernando/catkin_ws/src/ur_e_webots/scripts/ __name:=webots_universal_robots __log:=/home/fernando/.ros/log/b23c4398-9e09-11eb-b65c-291f9e169c91/webots_universal_robots-4.log].
log file: /home/fernando/.ros/log/b23c4398-9e09-11eb-b65c-291f9e169c91/webots_universal_robots-4*.log

I tried to solve the new problem by in the same way but couldn't because when i tried sudo apt-get install python-rospkg for install the python-rospkg package, i got:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-rospkg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:

E: Package 'python-rospkg' has no installation candidate
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-04-17 07:52:18 -0500

galou gravatar image

I don't have an answer but a workaround: ln -s /usr/bin/python3 ~/.local/bin/python, so that python is python3 (of course ~/.local/bin must be before /usr/bin in $PATH.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2021-04-15 11:54:51 -0500

Seen: 607 times

Last updated: Apr 17 '21