Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20.04 / noetic tutorial local install - python/python3 issue #385

Open
pringithub opened this issue Nov 21, 2022 · 3 comments
Open

20.04 / noetic tutorial local install - python/python3 issue #385

pringithub opened this issue Nov 21, 2022 · 3 comments

Comments

@pringithub
Copy link

Describe the bug
ros code errors ad infinitum when running on a local 20.04 / noetic install due to python not referenced correctly.

To Reproduce
Steps to reproduce the behavior:
Install local ROS noetic / Ubuntu 20.04 build
Run pick_and_place tutorial quick_demo - roslaunch niryo_moveit part_3.launch

Console logs / stack traces

/usr/bin/env: ‘python’: No such file or directory
[server_endpoint-2] process has died [pid 3112762, exit code 127, cmd /home/XXXXX/Projects/Tutorials/unity_ros/Unity-Robotics-Hub/tutorials/pick_and_place/ROS/src/ros_tcp_endpoint/src/ros_tcp_endpoint/default_server_endpoint.py --wait __name:=server_endpoint __log:=/home/pring5/.ros/log/aa238388-69b9-11ed-8f04-2db1b1a60ac8/server_endpoint-2.log].
log file: /home/pring5/.ros/log/aa238388-69b9-11ed-8f04-2db1b1a60ac8/server_endpoint-2*.log
[server_endpoint-2] restarting process
process[server_endpoint-2]: started with pid [3112763]

^ ad infinitum

Expected behavior
Code should run without errors

Environment (please complete the following information, where applicable):

  • Unity Version: n/a
  • Unity machine OS + version: n/a
  • ROS machine OS + version: 20.04 / noetic
  • ROS–Unity communication: n/a
  • Branch or version: v0.7.0

Additional context
Ubuntu 20.04 does not come with python as a command. Need to specify version.
Suggestions to solve: include a symlink or install the python-is-python3 package as outlined below. At minimum, add a note to do this in a readme.
https://stackoverflow.com/questions/3655306/ubuntu-usr-bin-env-python-no-such-file-or-directory/65059966#65059966

@FSund
Copy link

FSund commented Mar 1, 2023

Another solution is to add the following to ros_tcp_endpoint/CMakeLists.txt, and run catkin make

catkin_install_python(
  PROGRAMS
    src/ros_tcp_endpoint/default_server_endpoint.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

@paulonhantumbojr
Copy link

Another solution is to add the following to ros_tcp_endpoint/CMakeLists.txt, and run catkin make

catkin_install_python(
  PROGRAMS
    src/ros_tcp_endpoint/default_server_endpoint.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

@FSund I still came across errors after running catkin_make. The initial solution to install python-is-python3 solved the problem.

@eswarijayakumar
Copy link

Another solution is to add the following to ros_tcp_endpoint/CMakeLists.txt, and run catkin make

catkin_install_python(
  PROGRAMS
    src/ros_tcp_endpoint/default_server_endpoint.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

@FSund Thanks! This worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants