my CMakeLists.txt is like belows,
...
find_package(catkin REQUIRED COMPONENTS
roscpp
rosbag
sensor_msgs
pcl_conversions
nav_msgs)
...
During try to build code with ‘Cmake ..', following errors comes out
Traceback (most recent call last):
File "D:.../build/catkin_generated/generate_cached_setup.py", line 20, in <module>
from catkin.environment_cache import generate_environment_script
ImportError: No module named catkin.environment_cache
CMake Error at C:/opt/ros/noetic/x64/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(C:/Python27/python.exe
"D:.../build/catkin_generated/generate_cached_setup.py")
returned error code 1
Call Stack (most recent call first):
C:/opt/ros/noetic/x64/share/catkin/cmake/all.cmake:208 (safe_execute_process)
C:/opt/ros/noetic/x64/share/catkin/cmake/catkinConfig.cmake:21 (include)
CMakeLists.txt:99 (find_package)
catkin
command is working (this invokesCMake
)? $\endgroup$catkin
can be used within this command window. You can move to any folder/disk and execute the ROS commands as long as you stay in this command window with the specific ROS environment setup through thesetup.bat
. $\endgroup$