Ask Your Question
0

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: http://wiki.ros.org/noetic/Installati....

Then, i installed Webots: https://cyberbotics.com/

When i try to launch 'roslaunch ur_e_webots ur5e_joint_limited.launch' (NOTE: I used the package ur_e_webots. from https://github.com/fercuacho/ur_e_web... and copied it to the srcfolder of my workspace), as explained: https://github.com/cyberbotics/webots....

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/universal_robots_ros.py __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:
  python3-rospkg

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

1 Answer

Sort by ยป oldest newest most voted
0

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 142 times

Last updated: Apr 17