Error when calling a jupyter notebook file from matlab
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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")
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Integration with Online Platforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!