Ask Your Question

How do i run PYTHON3 scripts from a launch file ?

asked 2019-12-19 23:33:06 -0600

Hi ,

I have a working Ros-ified deeplearning code which happens to be in Python3 .

The script works fine when i do


I am not finding any information on how to include this in a launch file .

I am aware of

rosrun package_name

Can i set some argument for the python path while running the above command ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-19 23:47:48 -0600

Abhishekpg gravatar image

You can set your python path in your environment.


Then add below line to ur .bashrc file

export PYTHONPATH="path to your python3"

Hope this is what you are looking for

edit flag offensive delete link more


Changing your $PYTHONPATH is not going to change the default Python interpreter. It only changes the locations which the interpreter will search for Python modules.

I don't believe what you are suggesting will work.

gvdhoorn gravatar imagegvdhoorn ( 2019-12-20 03:48:19 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-12-19 23:33:06 -0600

Seen: 34 times

Last updated: Dec 19 '19