필터 지우기
필터 지우기

Error when calling a jupyter notebook file from matlab

조회 수: 4 (최근 30일)
Rachel Dawn
Rachel Dawn 2020년 11월 12일
답변: Jeff Miller 2020년 11월 13일
So, I'm trying to run a jupyter notebook file from a matlab script:
status = system("runipy K-meansCBeam.ipynb")
*runipy is some program that runs jupyter files from the command terminal. I've tried typing in "runipy K-meansCBeam.ipynb" into the command terminal and it does run that jupyter file. But, not sure how to do this from a matlab script.
This is the error I get:
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\user\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\User\anaconda3\Scripts\runipy.exe\__main__.py", line 7, in <module>
File "c:\users\user\anaconda3\lib\site-packages\runipy\main.py", line 132, in main
with open(args.input_file) as input_file:
FileNotFoundError: [Errno 2] No such file or directory: 'K-meansCBeam.ipynb'
status =
1

답변 (1개)

Jeff Miller
Jeff Miller 2020년 11월 13일
Just guessing here, but given that it is a file not found error, maybe you need to specify the path to the input file, something like:
status = system("runipy C:\MyPythonStuff\K-meansCBeam.ipynb")

카테고리

Help CenterFile Exchange에서 Integration with Online Platforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by