Matlab rosinit error:Could not install the required Python packages.
20 次查看(过去 30 天)
显示 更早的评论
Hi:
I want to use ros and matlab to realize co-simulation, but when I input rosinit in matlab, the following error appears:
matlab 2020b,updata6
Could not install the required Python packages. System error message:
'"C:\Users\t\AppData\Roaming\MathWorks\MATLAB\R2020b\ros1\win64\venv\Scripts\activate"'It is not an internal or external command, nor is it an executable program or batch file.
. Use pyenv function to set the path to the Python executable and retry the command.
I would appreciate your help.
3 个评论
sven lack
2022-2-4
Hi, thank you very much for sharing your solution. I had a similar problem. After the command "rosinit" the following error message came up:
>> rosinit
Launching ROS Core...
Could not create Python virtual environment.
'C:\Users\<user_name>\AppData\Roaming\MathWorks\MATLAB\R2020b\ros1\win64\venv\Scripts\python.exe' is not found. Verify installation of
Python in your system and re-create the Python virtual environment.
After some research, I came across the answer from B. W. Brokaw.
His tip solved the problem with the "virtual python enviornment" but led to a different error message:
>> rosinit
Launching ROS Core...
Adding required Python packages to virtual environment..Done.
Could not install the required Python packages. System error message: usage: python -m ensurepip [-h] [--version] [-v] [-U] [--user]
[--root ROOT] [--altinstall] [--default-pip]
python -m ensurepip: error: unrecognized arguments: --no-default-pip. Use pyenv function to set the path to the Python executable and retry the command.
Then I followed your hint and deleted the "C:\Users\<user_name>\AppData\Roaming\MathWorks\MATLAB\R2020b\ros1" folder. After that, the rosinit command worked without problems. Thank you!
回答(1 个)
Jagadeesh Konakalla
2023-4-18
https://de.mathworks.com/matlabcentral/answers/789104-could-not-create-python-virtual-environment#answer_682155
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Custom Message Support 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!