rosinit error - mac-m2 chip

23 次查看(过去 30 天)
Naveen Kumar
Naveen Kumar 2023-7-18
Trying to start ros by rosinit and getting following error
>> rosinit
Launching ROS Core...
Removing previous version of Python virtual environment..Done.
Creating a Python virtual environment...Done.
Unable to create Python virtual environment. System command returned: zsh:1: no matches found:
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python*-config
.

回答(1 个)

Aditya Singh
Aditya Singh 2023-7-19
Hi Naveen,
The error you're encountering with rosinit on Mac seems to be related to the Python virtual environment creation. To resolve this issue, you can try the following steps:
  1. Make sure you have Python installed on your Mac. You can check the version by running python --version in the terminal. If Python is not installed, you can install it from the official Python website.
  2. Verify that the Python executable is accessible in your system's PATH environment variable. You can check this by running echo $PATH in the terminal. The output should include the path to the Python executable.
  3. If the Python executable is not in PATH, you need to add uit by modifying the PATH environment variables. This can be done in different ways depending what shell you are using.
  4. Reload the shell configuration.
After completing these steps, try running rosinit again. It should now be able to create the Python virtual environment successfully. Also make sure all the requirements of the ROS toolbox are met, these can be found at ROS Toolbox System Requirements - MATLAB & Simulink - MathWorks India.
If the issue persists, please provide more details about your ROS and Python installations, as well as any other relevant error messages you receive.
Hope it helps!

类别

Help CenterFile Exchange 中查找有关 Call MATLAB from Python 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by