ROS-TCP-Endpoint
ROS-TCP-Endpoint copied to clipboard
Fix/python3 install
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
I implemented a similar fix today before I found this thread. My fix works for Python 3.8. Posted as Issue #120.
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
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
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.
But this was fixed in #141, so I'm closing this.