簡體   English   中英

Matlab python linux上的配置

[英]Matlab python configuration on linux

我目前正在嘗試設置Matlab 以在 Linux 虛擬機上使用 Volttron。 Python 3.8、Volttron、Matlab都安裝在虛擬機上。 當我在命令 window 中運行pyversion python.exe時,出現此錯誤:

Error using pyversion

Path argument does not specify a valid executable.

運行pe = pyenv; pe.Version返回空白,pyversion 也是如此。 本文檔描述了一種設置所用版本的方法,我相信這應該是我的下一步。 但是,說明說對於 Linux,我應該運行pyenv('Version','executable')但 python 已經安裝,據我所知,linux 沒有可以為 python 下載的可執行文件。我該如何解決這個問題?

如果您已按照建議的步驟設置 VOLTTRON,並在虛擬環境中運行 VOLTTRON,則要使用的 python 版本應位於該虛擬環境中的 env/bin/python 中。

正如這個答案中提到的,如果你想驗證路徑,你可以使用source env/bin/activate環境,然后運行 python。一旦進入 python 解釋器,你只需要打印系統可執行文件。

import sys
print(sys.executable)

值得注意的是,這是使用 VOLTTRON 連接到 MatLab 的舊方法。 您可能想嘗試使用較新的 MatLab 代理。 此方法的文檔包含在示例代理中。 https://volttron.readthedocs.io/en/latest/developing-volttron/developing-agents/example-agents/matlab-agent.html

新方法還假設 MatLab 在單獨的 Windows 環境中運行。 在您的情況下,您將在 linux 虛擬機中安裝獨立的 MatLab 代理程序,然后進行相應操作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM