Matlab pyversion command can not find library for python3.4

前端 未结 3 1878
庸人自扰
庸人自扰 2021-01-14 00:27

I want call python3.4 from the matlab. The default version is python2.7, when I run pyversion in matlab, it shows :

   version: \'2.7\'
executable: \'/usr/bi         


        
3条回答
  •  太阳男子
    2021-01-14 00:44

    Just so happened to have the same issue within 5 days of this post.

    Apparently matlab uses the following script to search for the library:

    MATLABROOT/toolbox/matlab/external/interfaces/python/+python/+internal/pyinfo.py

    where MATLABROOT is something you chose when you installed matlab.

    Theoretically, you could edit pyinfo.py to include '/usr/lib/x86_64-linux-gnu' in its search. For example, by appending one more method to the search locations that just returns '/usr/lib/x86_64-linux-gnu'. But I don't know what the licensing/legal/warranty ramifications of this would be, so use at your own discretion.

提交回复
热议问题