problem in calling out python script from matlab when i am calling the script from matlab its showing error in adafruit library ,it is in same directory . working in python
이전 댓글 표시
답변 (1개)
Yongjian Feng
2021년 10월 24일
0 개 추천
Try to add that folder into your PYTHONPATH env var.
댓글 수: 10
Abhinav Prashar
2021년 10월 24일
Yongjian Feng
2021년 10월 25일
You are running this on Windows, right?
But error message is about a missing directory on Linux/RaspberryOS (/proc/cpuinfo doesn't look like a Windows path)? Seems like a configuration problem somewhere.
Abhinav Prashar
2021년 10월 25일
Yongjian Feng
2021년 10월 27일
What python libraries are you using please? My feeling here is that one of the python lib is not configured properly for Windows. It uses a Linux/raspberry path (/proc/cpuinfo).
Abhinav Prashar
2021년 10월 31일
Yongjian Feng
2021년 10월 31일
편집: Yongjian Feng
2021년 11월 1일
Can you run the python script outside Windows (directly from python)? Does it work?
Also try to call a HelloWorld python script from matlab. See if that works.
Abhinav Prashar
2021년 11월 2일
Yongjian Feng
2021년 11월 2일
If it is not working outside matlab, then it is a python issue, right? Not a matlab issue.
Abhinav Prashar
2021년 11월 2일
Yongjian Feng
2021년 11월 3일
Strictly speaking, this is a matlab forum. If you can figure out which python lib/package causes your problem, maybe you can get help/support from the developer of that lib. Once it can run successfully outside matlab, then we can figure out how to run it from matlab.
카테고리
도움말 센터 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
