Code Monkey home page Code Monkey logo

Comments (16)

PeterS-mBryonics avatar PeterS-mBryonics commented on July 1, 2024 1

Also it all works fine on a WSL2 Ubuntu which is 22.04.3 LTS, but not on a native Ubuntu 23.04. I updated all the packages today to latest to make sure everything matched between the two environments as far as is possible.

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

Hi @PeterS-mBryonics, have you tried the trick at the bottom of https://robostack.github.io/FAQ.html? This should work - if not, feel free to reopen.

Best, Tobi

from robostack.github.io.

PeterS-mBryonics avatar PeterS-mBryonics commented on July 1, 2024

Heya, thanks, I gave that a go and it's still returning the same error:
CMake Error at /home/peter/mambaforge/envs/ros/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found version "3.11.4") Call Stack (most recent call first): /home/peter/mambaforge/envs/ros/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /home/peter/mambaforge/envs/ros/share/cmake-3.26/Modules/FindPython/Support.cmake:3766 (find_package_handle_standard_args) /home/peter/mambaforge/envs/ros/share/cmake-3.26/Modules/FindPython3.cmake:551 (include) /home/peter/mambaforge/envs/ros/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:24 (find_package) /home/peter/mambaforge/envs/ros/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include) /home/peter/mambaforge/envs/ros/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions) CMakeLists.txt:29 (rosidl_generate_interfaces)

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

It finds the wrong Python; could you please create a new environment without pip uninstalling numpy, delete all build/devel files in the colcon workspace, and try again?

from robostack.github.io.

PeterS-mBryonics avatar PeterS-mBryonics commented on July 1, 2024

Ta, tried it, same issue with a plain "colcon build" and with "colcon build --cmake-args "-DPython_EXECUTABLE=$CONDA_PREFIX/bin/python -DPython3_EXECUTABLE=$CONDA_PREFIX/bin/python -DPYTHON_EXECUTABLE=$CONDA_PREFIX/bin/python"" (deleted build and install both times)

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

I'm sorry to hear that it still does not work. I recommend avoiding the outdated FindPython3.cmake and instead using the newer FindPython.cmake that has much better support for conda. Switching is very easy, simply replacing find_package(Python3 ...) with find_package(Python ...) and then replacing e.g. Python3_INCLUDE_DIRS with Python_INCLUDE_DIRS and so forth.

from robostack.github.io.

PeterS-mBryonics avatar PeterS-mBryonics commented on July 1, 2024

Thanks, I'll give that a go. If I'm understanding the traceback correctly that tweak should be made in:
mambaforge\envs\ros\share\rosidl_generator_py\cmake\rosidl_generator_py_generate_interfaces.cmake ?

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

Ah, now I realise that it’s not in your user code but in some ROS2 package. That’s very weird!

Could you please provide a minimum working example to replicate this issue? Then I can take a look. Please also run conda env export > environment.yml and share the output so I can replicate your environment 1:1.

Thanks, Tobi

from robostack.github.io.

PeterS-mBryonics avatar PeterS-mBryonics commented on July 1, 2024

ros2_ws.zip
ros_test_yml.zip
No worries, see attached. I followed the https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.html tutorial to create a c++ package to test building, and https://robostack.github.io/GettingStarted.html to create the environment (including adding the build tools)

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

That's very weird. I don't have an Ubuntu 23.04 installation around, so it's hard for me to debug. In theory, if you install all build tools, there should be no difference ..

from robostack.github.io.

PeterS-mBryonics avatar PeterS-mBryonics commented on July 1, 2024

Did a complete clean install of Ubuntu as I was having a similar issue with something else which wanted to call system python and became similarly unhappy. Still has this issue so thankfully it should be easy enough to replicate:
Fresh install of Ubuntu 23.04
Install Miniforge/Mamba
Follow steps to install Robostack
Try to build a C++ package
Next I'll try without the miniforge bit just in case it's that

from robostack.github.io.

PeterS-mBryonics avatar PeterS-mBryonics commented on July 1, 2024

Backdated to 22.04 LTS, all good. So something changes going from 22.04 to 23.04

from robostack.github.io.

craig-m-k avatar craig-m-k commented on July 1, 2024

I have the same problem on macos while trying to run this: https://docs.px4.io/main/en/ros/ros2_offboard_control.html#humble

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

@craig-m-k - could you please provide a detailed traceback of the error? MacOS will be easier for me to replicate than the ubuntu 23.04/22.04 difference.

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

Can you try passing -DPython3_FIND_STRATEGY=LOCATION as additional cmake_arg, please?

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 1, 2024

We've confirmed that -DPython3_FIND_STRATEGY=LOCATION finds the correct Python installation, and added it to the FAQ. Closing here.

from robostack.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.