Robotics StackExchange | Archived questions

Rospy installation on Python 3

Hi! I would like to know how to install rospy ROS package on my Python 3 virtual environment. Right now it only detects the rospy version corresponding to the base installed python 2.7, but does not work for my Python 3 code development.

Thank you!

Asked by nuran on 2019-05-08 03:56:45 UTC

Comments

I've tried following scripts like below, unsuccessfully. Python 3 support still feels like its in a pretty poor state. And in ROS2 few packages are ported. Is there a reason you need Python 3?

https://gist.github.com/ShreyasSkandan/fd8682253d71c960b2b56376db6bd74a

Let me know if you figure it out!

Asked by rukie on 2019-05-08 08:44:36 UTC

I've also tried this... https://medium.com/@beta_b0t/how-to-setup-ros-with-python-3-44a69ca36674

Asked by rukie on 2019-05-08 08:47:12 UTC

Currently I have two separate programs that one works in python 2 and the other one in python 3 so I need to run a virtual environment for each one. But I have issues with the Rospy package on Python 3 that I do not know how to solve it.

Asked by nuran on 2019-05-08 09:17:32 UTC

Answers

You tagged kinetic, which doesn't officially support python3. You can read a bit more about the current ways to use it for example in q237613 (look at v4hn's answer).

Asked by aPonza on 2019-05-08 05:42:53 UTC

Comments