Python Error: ModuleNotFoundError: No module named 'sklearn'
10 次查看(过去 30 天)
显示 更早的评论
Hi,
I was calling Python from MATLAB but I got the above error.
I have installed sklearn using PyCharm and it ran normally using Python.
What should I do to enable the package on MATLAB?
2 个评论
Eric Delgado
2021-2-22
编辑:Eric Delgado
2021-2-22
Hey @Zair Ahmedi, I am having the same issue... I can import "math module", but not "numpy module", for example. Did you find a solution?! I don't want to reinstall Matlab or Python! :)
Eric Delgado
2021-2-22
@Zair Ahmedi, I figure out what happened with my issue... I had two instances of Python installed on my computer. So Matlab was pointing to the raw version of Python (without Numpy and others modules).
So I just configure the right version of Python and it's allright now. :)
pyenv('Version', 'C:\ProgramData\Anaconda3\python.exe')
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!