Python Library path not included in (pyenv) Matlab when using a python venv?

8 ビュー (過去 30 日間)
Barry
Barry 2020 年 11 月 20 日
コメント済み: Gokul 2020 年 12 月 10 日
Hi All,
I have a question about Python in Matlab. Everything works fine when i use the base interpreter for Python(3.8) which is installed on my computer. But i also have a venv for a project and i thought i could just use the pyenv('Version', 'exectuionPathOfVenv') method to set the interpreter of my venv (because i have all packages installed on my venv, not on my base interpreter). But when i use pyenv again the variable Library: "" has no path anymore (is empty, before it was .../python38.dll) and i cant use any py.command functions anymore.
The venv was created with PyCharm. Is there some "fix" to this, or am i doing something wrong? i also read that the Library variable is read-only, so i won´t be able to just set it? I know that i could install all packages onto the main interpreter but this is not the ideal solution.
Hope someone can help me out :)
Thanks,
Barry

採用された回答

Barry
Barry 2020 年 11 月 23 日
Ok, just had to add the Python Paths to the System Paths and that solved the "problem"..
  1 件のコメント
Gokul
Gokul 2020 年 12 月 10 日
How exactly do you do that? I have similar issue

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by