It appears that catkin_python_install() is not working correctly in terms of selecting Python3 at runtime to run the teleop.py and teleop_speed_control.py, when the package is installed from deb/binary or with catkin_make install. This can be reproduced on a Noetic machine (e.g. my laptop and 2 Jackals) with:
In both instances, ROS will complain with /opt/ros/noetic/bin/rosrun: /home/jyang/projects/test_ws/install/lib/axis_camera/teleop.py: /usr/bin/python: bad interpreter: No such file or directory
To fix this, we can just specify Python3 in the shebang.
This PR also removes the shebang in setup.py, since it is not necessary, as per:
It appears that
catkin_python_install()
is not working correctly in terms of selecting Python3 at runtime to run theteleop.py
andteleop_speed_control.py
, when the package is installed from deb/binary or withcatkin_make install
. This can be reproduced on a Noetic machine (e.g. my laptop and 2 Jackals) with:sudo apt-get update
sudo apt-get install ros-noetic-axis-camera
rosrun axis_camera teleop.py
OR
cd ~/catkin_ws/src
git clone -b noetic-devel https://github.com/ros-drivers/axis_camera.git
cd ..
catkin_make install
source install/setup.bash
rosrun axis_camera teleop.py
In both instances, ROS will complain with
/opt/ros/noetic/bin/rosrun: /home/jyang/projects/test_ws/install/lib/axis_camera/teleop.py: /usr/bin/python: bad interpreter: No such file or directory
To fix this, we can just specify Python3 in the shebang.
This PR also removes the shebang in
setup.py
, since it is not necessary, as per: