ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

use python3 for catkin build

asked 2020-06-24 00:55:09 -0500

gab27 gravatar image

updated 2020-07-09 21:06:52 -0500

Hi

is there a way to use a custom python version during the build process?

I would like to use python3 from an virtual environment.

I came across this: related question. There someone said to use SET(ENV{PYTHONPATH} "/the/path/you/want") in CMakeLists.txt.

Where do I place this command in CMakeLists? and whats the exact path? /path_to_env/virutal_env/bin/python?

Thanks

edit retag flag offensive close merge delete

Comments

I think this would be a duplicate of #q348093.

Please check if this answers your question, and if so, close it as a duplicate.

mgruhler gravatar image mgruhler  ( 2020-07-10 02:17:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-02-10 03:13:48 -0500

ticotico gravatar image

Here is the answer you are looking for. The part where you specify your desired python version is here:

catkin build -DCATKIN_ENABLE_TESTING=0 -DCMAKE_BUILD_TYPE=Release -DPYTHON_VERSION=3.5

Hope that helps

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-06-24 00:55:09 -0500

Seen: 864 times

Last updated: Feb 10 '22