ROS-TCP-Endpoint icon indicating copy to clipboard operation
ROS-TCP-Endpoint copied to clipboard

Fix/python3 install

Open rokusottervanger opened this issue 2 years ago • 3 comments

Proposed change(s)

Added catkin_install_python in CMakeLists to fix compatibility with Python3 installations

Useful links (GitHub issues, JIRA tickets, forum threads, etc.)

Provide any relevant links here.

Types of change(s)

  • [x] Bug fix
  • [ ] New feature
  • [ ] Code refactor
  • [ ] Documentation update
  • [ ] Other (please describe)

Testing and Verification

Running the ROS node before this change results in errors such as no module named yaml because of a Python version mismatch.

Running with this change succesfully starts the ROS node.

Test Configuration:

  • ROS machine OS + version: [e.g. Ubuntu 18.04, ROS Noetic]

Checklist

  • [x] Ensured this PR is up-to-date with the dev branch
  • [x] Created this PR to target the dev branch
  • [x] Followed the style guidelines as described in the Contribution Guidelines
  • [ ] Added tests that prove my fix is effective or that my feature works
  • [x] Updated the Changelog and described changes in the Unreleased section
  • [x] Updated the documentation as appropriate

Other comments

rokusottervanger avatar Nov 26 '21 09:11 rokusottervanger

CLA assistant check
All committers have signed the CLA.

unity-cla-assistant avatar Nov 26 '21 09:11 unity-cla-assistant

I implemented a similar fix today before I found this thread. My fix works for Python 3.8. Posted as Issue #120.

ahuard0 avatar Jan 07 '22 16:01 ahuard0

Please merge this. The addition is fully ROS-conform: http://wiki.ros.org/UsingPython3/SourceCodeChanges#Changing_shebangs https://github.com/ros/catkin/blob/0baff3a78c3ca1fcbf65493a8d656054a61a6c12/cmake/catkin_install_python.cmake#L1-L13

ipa-lth avatar May 25 '22 08:05 ipa-lth

I changed the shebang in the 'default_server_endpoint.py' from '#!/usr/bin/env python' -> '#!/usr/bin/env python3' have tested it and works fine with ros noetic and python3

ShubhamNandi avatar Feb 16 '23 14:02 ShubhamNandi

That's not a fix, it's a workaround. Handling different python versions is implemented in this CMake macro that I proposed in this PR.

rokusottervanger avatar Feb 16 '23 18:02 rokusottervanger

But this was fixed in #141, so I'm closing this.

rokusottervanger avatar Feb 16 '23 18:02 rokusottervanger