赞
踩
pip install numpy
报错
ERROR: Package 'numpy' requires a different Python: 2.7.17 not in '>=3.8'
解决方案:
指定版本即可:
sudo pip install numpy==1.20.3
- rosbag play xx.bag
- bash: /opt/ros/melodic/bin/rosbag: /usr/bin/python2: 解释器错误: 没有那个文件或目录
解决方法:
- python
- Python 2.7.17 (default, Mar 8 2023, 18:40:28)
- [GCC 7.5.0] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> ls
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- NameError: name 'ls' is not defined
- >>> import sys
- >>> sys.path
- ['', '/home/ubuntu/ws_livox1/devel/lib/python2.7/dist-packages', '/home/ubuntu/ws_livox/devel/lib/python2.7/dist-packages', '/opt/ros/melodic/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/ubuntu/.local/lib/python2.7/site-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk3']
按Ctrl+D
找到这个位置
/usr/lib/python2.7
重新建立软链接
- sudo ln -s /usr/bin/python2 /usr/bin/python
- sudo ln -s /usr/bin/python2.7 /usr/bin/python2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。