Closed lakshman-1396 closed 4 years ago
This is an issue with NumPy. You have got a few options to fix this:
I tried to install it manually using python setup.py install i am getting the following error
import sklearn_pmml_model from sklearn_pmml_model import tree Traceback (most recent call last): File "
", line 1, in File "\ns-sisci01hd\home_s01\Citrix_Folder_Redirect\My Documents\sklearn-pmml-model\sklearn_pmml_model\tree__init__. py", line 6, in from .tree import PMMLTreeClassifier, construct_tree File "\ns-sisci01hd\home_s01\Citrix_Folder_Redirect\My Documents\sklearn-pmml-model\sklearn_pmml_model\tree\tree.py", line 4, in from sklearn_pmml_model.tree._tree import Tree, NODE_DTYPE, TREE_LEAF, TREE_UNDEFINED ModuleNotFoundError: No module named 'sklearn_pmml_model.tree._tree'
Hmm thats curious, setup should compile the Cython modules. To ensure the install works, run python setup.py build_ext --inplace
first, then run python setup.py install
.
Same error. Cython modules are compiled during the build. why is it not recognizing the _tree module? is it something to do with the setup file? any ideas?
from sklearn_pmml_model.ensemble import PMMLForestClassifier Traceback (most recent call last): File "
", line 1, in File "\ns-sisci01hd\home_s01\Citrix_Folder_Redirect\My Documents\sklearn-pmml-model\build\lib.win-amd64-3.6\sklearn_pmml_model\ensemble__init.py", line 6, in from .forest import PMMLForestClassifier File "\ns-sisci01hd\home_s01\Citrix_Folder_Redirect\My Documents\sklearn-pmml-model\build\lib.win-amd64-3.6\sklearn_pmml_model\ensemble\forest.py", line 3, in init__.py", line 6, infrom sklearn_pmml_model.tree._tree import Tree, NODE_DTYPE File "\ns-sisci01hd\home_s01\Citrix_Folder_Redirect\My Documents\sklearn-pmml-model\build\lib.win-amd64-3.6\sklearn_pmml_model\tree\ from .tree import PMMLTreeClassifier, construct_tree File "\ns-sisci01hd\home_s01\Citrix_Folder_Redirect\My Documents\sklearn-pmml-model\build\lib.win-amd64-3.6\sklearn_pmml_model\tree\tree.py", line 4, in from sklearn_pmml_model.tree._tree import Tree, NODE_DTYPE, TREE_LEAF, TREE_UNDEFINED ModuleNotFoundError: No module named 'sklearn_pmml_model.tree._tree'
Alright, I have recently introduced building wheels for the sole purpose of preventing issues with compiling, so let's not go there.
I have gone over all recent numpy versions up to a year ago and found that your original problem only occurs for numpy versions lower than 1.16.0. I have added a constraint to the installation such that this problem is automatically fixed upon pip install. (There were some more compatibility issues with the most recent version of scikit-learn that have been fixed too.)
Could you try using the library again by installing it with pip install sklearn_pmml_model==0.0.13
? As far as I was able to test, this versions works.
Closing this issue due to inactivity. I expect the problem to be fixed, if not please let me know!
from sklearn_pmml_model.ensemble import PMMLForestClassifier
Error: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216from C header, got 192 from PyObject