Unable to run mwpython
15 ビュー (過去 30 日間)
古いコメントを表示
Hi, I recently received a Python library compiled using the MATLAB Compiler by a collaborator (in MATLAB R2021b), and am currently unable to run it. I saw that on MacOS (I'm running v12.0.1 Monterey on an M1 processor using Rosetta 2 for compatibility), a special mwpython application is needed instead of calling the system python. I installed v9.11 of the MATLAB Runtime and followed directions for adding to the DYLD_LIBRARY_PATH. When I run /<abs_path_to_app>/mwpython3.9, however, the following error message is displayed:
dyld[17284]: Library not loaded: @rpath/libpython3.9.dylib
Referenced from: /Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/mwpython3.9
Reason: tried: '/Applications/MATLAB/MATLAB_Runtime/v911/runtime/maci64/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/sys/os/maci64/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/extern/bin/maci64/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/./libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/../../../../../bin/maci64/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/../../../../../sys/os/maci64/libpython3.9.dylib' (no such file), '/Library/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/./libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/../../../../../bin/maci64/libpython3.9.dylib' (no such file), '/Applications/MATLAB/MATLAB_Runtime/v911/bin/maci64/mwpython3.9.app/Contents/MacOS/../../../../../sys/os/maci64/libpython3.9.dylib' (no such file), '/Library/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib' (no such file), '/usr/local/lib/libpython3.9.dylib' (no such file), '/usr/lib/libpython3.9.dylib' (no such file)
Abort trap: 6
It appears that libpython3.9.dylib was not included in the installation of the MATLAB Runtime. Is there a way to get it or work around the issue? Thanks in advance.
1 件のコメント
scivision
2023 年 11 月 29 日
I fixed this error message by "conda deactivate" in the Terminal session I'm using. I do this each time I start a new Terminal where I want to use "mwpython".
回答 (1 件)
Thomas Morrell
2021 年 11 月 11 日
1 件のコメント
Hovav Lazare
2023 年 8 月 30 日
how do you Installing Python in the standard location in x86 compatibility mode on M1?
参考
カテゴリ
Help Center および File Exchange で Python Package Integration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!