Error when trying to use 'rosinit' command
9 次查看(过去 30 天)
显示 更早的评论
I'm very new to ROS and when I try to launch the 'rosinit' command on my M1 mac i receive the following message/error:
>> rosinit
Launching ROS Core...
Adding required Python packages to virtual environment..chmod: /Users/mattiawaitz/.matlab/R2021a/ros1/maci64/venv/bin/activate: No such file or directory
bash -c 'PATH=$PATH:/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS ; /Users/mattiawaitz/.matlab/R2021a/ros1/maci64/venv/bin/activate ; DYLD_LIBRARY_PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/lib /Users/mattiawaitz/.matlab/R2021a/ros1/maci64/venv/bin/python -m ensurepip --upgrade --no-default-pip -v -v -v': Killed
Done.
Could not install the required Python packages. System error message: bash:
/Users/mattiawaitz/.matlab/R2021a/ros1/maci64/venv/bin/activate: No such file or directory
bash: line 1: 91406 Killed: 9
DYLD_LIBRARY_PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/lib
/Users/mattiawaitz/.matlab/R2021a/ros1/maci64/venv/bin/python -m ensurepip --upgrade --no-default-pip -v -v -v
. Use pyenv function to set the path to the Python executable and retry the command.
I've installed Python 2.7 as requested by the help page and already tried using the 'pyenv' command as suggested by MATLAB in the last line.
0 个评论
回答(1 个)
Jagadeesh Konakalla
2021-10-21
Can you try the following once and let me know ?
>> pyenv('Version',<path to python 2.7>);
>> ros.internal.createOrGetLocalPython(true);
>> rosinit
Thanks and regards,
Jagadeesh
4 个评论
Jagadeesh Konakalla
2021-10-21
Hi Mattia,
I think it is installed in /usr/local/bin.
So, try the following. It should work
>>pyenv("Version","/usr/local/bin/python")
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Analog Devices ADALM1000 Support from Data Acquisition Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!