I tried PYSAL library in python for Basic OLS method, I followed official documentation from pysal library and for some reason summary for OLS can be shown it says 'str' object has no attribute 'summary'
YVar='cena'
XVars = ["km", "stari", "diesel"]
Y=data[YVar].as_matrix().reshape((len(data),1))
X=data[XVars].as_matrix()
ols=ps.model.spreg.OLS(Y,X,name_y=YVar, name_x=XVars,nonspat_diag=True, white_test=True)
# till here it works perfectly
print("ols".summary())