Skip to content
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

运行./build_ros.sh报错 #22

Open
Rosa712 opened this issue Nov 20, 2023 · 6 comments
Open

运行./build_ros.sh报错 #22

Rosa712 opened this issue Nov 20, 2023 · 6 comments

Comments

@Rosa712
Copy link

Rosa712 commented Nov 20, 2023

按照博主的方式在bashrc里添加了rospkg路径但还是报错
image
image
但是运行./build.sh是正常的

@YWL0720
Copy link
Owner

YWL0720 commented Nov 20, 2023

ros的问题,是否用了conda环境?

@Rosa712
Copy link
Author

Rosa712 commented Nov 21, 2023

ros的问题,是否用了conda环境?

运行./build_ros.sh时没有使用conda创建的虚拟环境

@YWL0720
Copy link
Owner

YWL0720 commented Nov 21, 2023

那先pip install rospkg试试吧

@Rosa712
Copy link
Author

Rosa712 commented Nov 24, 2023

那先pip install rospkg试试吧

我查了以下好像是python版本问题,虽然上面-- Found PythonInterp: /usr/bin/python (found version "2.7.18")显示找到python2.7版本,但是下面File "/opt/ros/noetic/lib/python3/dist-packages/roslib/init.py", line 50, in 仍然时python3和ros自带的python2.7不符所以导致rospkg报错,但是我在bashrc里将python变量指定为python2.7仍未解决问题,目前也不想卸载python3.8会导致其他代码无法运行
image

@atacanturk
Copy link

@YWL0720 @Rosa712 same problem. Is catkin workspace necessary to build ros examples?

@sensoryu
Copy link

you can view https://blog.csdn.net/weixin_62952541/article/details/131807996 to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants