# ROS2: Cannot run my Python script, "No executable found" error

**URL:** <https://discourse.openrobotics.org/t/ros2-cannot-run-my-python-script-no-executable-found-error/3912>\
**Category:** ROS General\
**Tags:** ros2\
**Created:** [February 7, 2018, 3:50pm UTC](https://discourse.openrobotics.org/t/ros2-cannot-run-my-python-script-no-executable-found-error/3912 "2018-02-07T15:50:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![marguedas](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/marguedas/32/1633_2.png) [@marguedas](https://discourse.openrobotics.org/u/marguedas)\
**Post date:** [February 7, 2018, 5:00pm UTC](https://discourse.openrobotics.org/t/ros2-cannot-run-my-python-script-no-executable-found-error/3912/3 "2018-02-07T17:00:53Z")

</div>

Agreed with @dirk-thomas’s comment.  
I would expect your executables to be installed in `bin` so it should be on the `PATH` and can be invoked directly from the commandline.  
If you want the executables to not be on the path and to be invokable using `ros2 run` you need to them install to `<install-prefix>/lib/<pkgname>`, you can specify this in the `setup.cfg` file: [examples/rclpy/topics/minimal\_publisher/setup.cfg at a75151ef1388b565268508228df42c06462c1337 · ros2/examples · GitHub](https://github.com/ros2/examples/blob/a75151ef1388b565268508228df42c06462c1337/rclpy/topics/minimal_publisher/setup.cfg)

---

_[View the full topic](https://discourse.openrobotics.org/t/ros2-cannot-run-my-python-script-no-executable-found-error/3912)._
