call python script contains pytorch module

6 Ansichten (letzte 30 Tage)
Hanzhong Zheng
Hanzhong Zheng am 25 Okt. 2019
Kommentiert: peng xue am 7 Jun. 2020
Hello,
I am calling a python script, which uses the pytorch module, but it generates error:
"Traceback (most recent call last):
File "/Users/zhengh3/Documents/MATLAB/afreg/kronecker_product.py", line 2, in <module>
import torch
ImportError: No module named torch"
I have tried to change the current pyversion to the path where I installed the pytorch. Is there anyway the matlab will recognize the torch.
Thank you so much!
Hanzhong
  1 Kommentar
peng xue
peng xue am 7 Jun. 2020
Hi, I have the same problem as you. Have you solved this problem now?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Vimal Rathod
Vimal Rathod am 30 Okt. 2019
You can refer to the following link to get more understanding on calling python library functions:
Hope this helps!

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by