필터 지우기
필터 지우기

Python - unable to resolve py.XXXX on Matlab 2021b, Big Sur, M1 Chip

조회 수: 22 (최근 30일)
Martin White
Martin White 2021년 11월 10일
답변: Dhruv 2024년 5월 23일
Hi all,
Has anyone come across this problem? I am trying to setup MATLAB to use python. I believe I have done everything correctly, but am facing some problems and cannot seem to find any solution online and not sure if this is a compatibility problem?
I am running MATLAB v2021b, MacBook Pro, M1 Chip, 2020, 16 GB memory, Big Sur (11.6.1).
I have followed the advice here: https://uk.mathworks.com/help/matlab/matlab_external/install-supported-python-implementation.html which included building python with the "--enable-shared" option.
Here is the output when I try a simple test:
py.list({'hello', 'world'})
Unable to resolve the name py.list.
output from pyversion seems correct:
version: '3.9'
executable: '/Users/XXXX/.pyenv/versions/3.9.2/bin/python'
library: '/Users/XXXX/.pyenv/versions/3.9.2/lib/libpython3.9.dylib'
home: '/Users/XXXX/.pyenv/versions/3.9.2'
isloaded: 0

답변 (1개)

Dhruv
Dhruv 2024년 5월 23일
Hi Martin,
I would recommend refering to the following MATLAB Answer post, which could provide a resolution to the issue:
Should this resource not address your problem, you may want to consider the following actions:
  • Upgrade to the most recent version of MATLAB.
  • Experiment with a different version of Python, ensuring that the setup is correctly configured.
If, after these steps, you're still encountering issues, I advise reaching out to MathWorks Technical Support for further assistance.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by