-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could NOT find Boost (missing: Boost_INCLUDE_DIR python3) #349
Comments
Did you get any progress on this? I'm stuck at the same issue with Windows 10-built foxy. |
Not yet |
+1. Stuck at the same issue as well here. |
Were you guys able to resolve this issue? Been attempting for a week now but to no avail. Below are details of what I tried so far: Environment
Installation of BOOST
cd C:\Program Files\boost\boost_1_71_0
bootstrap vc142
.\b2 I have looked at #289 which is resolved by an earlier merged pull request and have also verified that the installed BOOST library I have contains a
The echo %Path% | findstr boost\boost_1_71_0\libs\python Terminal OutputC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp;C:\Python38\Scripts\;C:\Python38\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSL-Win64\bin;C:\opencv\x64\vc16\bin;C:\ProgramData\chocolatey\lib\cunit\lib;C:\ProgramData\chocolatey\lib\tinyxml2\lib;C:\ProgramData\chocolatey\lib\log4cxx\lib;C:\ProgramData\chocolatey\lib\bullet\lib;C:\Program Files\Graphviz\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\bin;C:\Users\beyhy\cd-comms;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.5.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\beyhy\anaconda3\Scripts;C:\Users\beyhy\AppData\Local\atom-beta\bin;C:\Program Files\VideoLAN\VLC;C:\Qt\5.15.2\mingw81_64\bin;C:\Program Files\Cppcheck;C:\Program Files (x86)\GnuWin32\bin;C:\iconv-1.14-win32-x86_64\bin;C:\zlib-1.2.8-win32-x86_64\bin;C:\xmllint\bin;C:\Python38\Lib\site-packages\PyQt5\Qt5\bin;C:\Program Files\CMake\bin;C:\Program Files\boost\boost_1_71_0;C:\Program Files\boost\boost_1_71_0\libs\python;;C:\Users\beyhy\AppData\Local\Microsoft\WindowsApps;C:\Users\beyhy\AppData\Local\atom-beta\bin I have also tried replacing line 32 of find_package(Boost COMPONENTS python3 REQUIRED) to this: find_package(Boost COMPONENTS python REQUIRED) Since the python library in the installed BOOST library is labelled However, that still did not work. Appreciate any help or constructive feedback at the moment. Not sure how to proceed after hours of google searching for alternative solutions. |
i ran into the same problem, and solved it by adding the following code to line 32 in the CMakeList.txt file within the the problem comes from newer versions of boost-python including the full version string, so if you have python 3.8 installed it will be
|
im working on a PR now to add this update into the main |
@flynneva I have tried the solution you provided and the results are similar, as shown below; What I DidFollowed the modifications made in the pull request #390. I have ensured no other unintentional modifications are made by redownloading the ros2 branch of vision_opencv via the following commands: rem Opening up the Visual Studio Native Command Prompt Terminal
cd C:\Users\beyhy\ros_workspaces\vcam_ws\src
git clone https://github.com/ros-perception/vision_opencv.git --single-branch --branch ros2 --depth 1
cd C:\Users\beyhy\ros_workspaces\vcam_ws
call C:\opt\ros\foxy\local_setup.bat
colcon build --packages-select cv_bridge ResultsSimilar error as before. See screenshot below. It continues to generate the error: Could NOT find Boost (missing: python38) (found version "1.71.0") Further DebuggingI have verified my Python installation as shown below by running I don't think Boost.Python is using its own internal PythonLibs so I am unsure what else I am doing wrong here. |
@cardboardcode do you have to get boost python you either have to download the pre-compiled version of boost or compile it yourself. id recommend downloading the pre-compiled version and adding it to your environment variable (you need to add the full path to where-ever you installed boost to your So for instance on my window setup I added this to my yours might be different depending on what boost version you install. i've spent my fair share of grinding through getting boost installed on windows so let me know if you have issues still....and know that I feel your pain. |
i think going forward it would be best to remove the boost dependency all together from this package...but that'll take some work id expect. ill eventually look into it, just dont have the time now |
Thanks @flynneva. I finally managed to resolve this build error and successfully built I will delve into deeper details on how I resolved it on my side shortly. |
Source Of IssueLooking at what resolved it for me personally, the reasons why I encountered the build error is due to 2 sources:
Why did I have Python 3.8?In following the Installing ROS2 on Windows article from the official ROS2 Foxy documentation, the instructions recommended installing python 3.8 via the command: choco install -y python --version 3.8.3 Why did I have BOOST 1.71.0?This was the first BOOST library version I came across which is verified to be compatible and stable with Visual Studio 2019 Community Edition. As stated under Solution, I would later realize that BOOST 1.71.0 is only compatible with Python 3.7. [🙌Solution🙌] - [ Updated (2021/05/14) : Please follow the solution attached below. This solution will cause problems when running with ROS2 commands like ros2 run ... ]This section covers how the build error is resolved by addressing the 2 aformentioned sources: Installing precompiled BOOST via
|
[ 🙌 Solution 🙌 ]Hi all, please follow this instead. Realized the solution I proposed above is faulty because using Python 3.7.9 instead of Python 3.8.3 will cause ROS2 commands to fail. So here's the rectified version of the instructions. Install Dependencies
Python 3.8.3For this, just use the recommended command in the ROS2 documentation in an administrator command prompt: choco install -y python --version 3.8.3 BOOST 1.73.0Identified that BOOST 1.73.0 is compatible with Python 3.8 using the instructions in Finding out What Python Library version is compatible with BOOST 1.71.0.
Verifying That It WorksGo through the steps below to verify if the build error is still encountered. rem Opening up the Visual Studio Native Command Prompt Terminal
mkdir -p c:\ros2_ws\src
cd c:\ros2_ws\src
git clone https://github.com/flynneva/vision_opencv.git --single-branch --branch ros2 --depth 1
cd c:\ros2_ws\
call c:\opt\ros\foxy\local_setup.bat
colcon build --packages-select cv_bridge |
sudo -H apt-get install -y libboost-dev |
Issue is explained in detail, and there seems to be no actionables for this repository. Closing! |
Well I got the same issue again after I followed the instructions from @cardboardcode. cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message): |

In my case, I have failed to execute "**colcon build"** My environment is :MacOS Catalina
ROS2 Foxy
Cmake 3.18
Boost 1.72
The text was updated successfully, but these errors were encountered: