I am running matlab engine from python, and it is giving an error on the line that imports matlab.engine saying that there is no module called named "matlab.engine", and that matlab is not a package. But when I try to import just matlab, it gives me an error saying AttributeError: module 'matlab' has no attribute 'engine'.
I already have matlab installed on python, as well as the engine in the matlab root folder where the engines/python is. I'm using python verison 3.6 and matlab 2018, I don't see a compatibility issue here. I am not sure what else to try.
import matlab
from numpy import *
import sys
if __name__ == '__main__':
print(sys.maxsize > 2 ** 32)
eng = matlab.engine.connect_matlab()
names = matlab.engine.find_matlab()
print(names)
eng = matlab.engine.start_matlab()
A = matlab.double([[1,2],[5,6]])
print(type(A),A.size,A)
print(eng.eig(A))
eng.quit()
pass