You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get the python binding of mlpack by following the instructions given in README.MD .
What is the output?
On running make -j8 , I got the following output on command line.
I am pasting the small range of output(where the warning is) since there is character limit.
home/aditya/Desktop/mlpack/src/mlpack/bindings/python/print_wrapper_py.cpp: In function ‘void mlpack::bindings::python::PrintWrapperPY(const string&, const string&, const string&)’: /home/aditya/Desktop/mlpack/src/mlpack/bindings/python/print_wrapper_py.cpp:67:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char> > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 67 | for(int i=0; i<methods.size(); i++) | ~^~~~~~~~~~~~~~~ [ 88%] Linking CXX executable ../../../bin/generate_pyx_krann [ 88%] Built target generate_pyx_krann [ 88%] Building Cython binding decision_tree.so... /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release warnings.warn( /usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running build_ext cythoning mlpack/decision_tree.pyx to mlpack/decision_tree.cpp [ 88%] Linking CXX executable ../../../bin/generate_pyx_linear_regression_predict [ 88%] Built target generate_pyx_linear_regression_predict [ 88%] Building Cython binding det.so... /home/aditya/.local/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/aditya/Desktop/mlpack/build/src/mlpack/bindings/python/mlpack/decision_tree.pyx tree = Parsing.p_module(s, pxd, full_module_name)
Steps to reproduce:
Ubuntu - 22.04
Python-3.10.6
Follow the instructions given in README.MD to install python bindings.
This issue is already reported in the following link: Issue 1 Issue 2
The text was updated successfully, but these errors were encountered:
Please look into the matter as I am getting more warnings. I have followed the manual steps as described in mlpack README.
These are the steps that I followed:
git clone the repository in local terminal
install all the dependent packages.
made a build folder inside source directory
cmake -DBUILD_PYTHON_BINDINGS=ON ../
sudo make -j12
sudo make install
With few warnings, It shows that it has completely installed the python bindings.
But when I run import mlpack inside any .py file, it gives ModuleNotFoundError.
Once I also had this particular problem, then I run the python script in build/src/mlpack/bindings/python which then worked for me. Please try it out, it may help you too.
Did you set PYTHONPATH correctly? Manually building the Python bindings often requires some amount of debugging along those lines. (This is why they are packaged in pip and conda.)
What am I trying to accomplish?
I was trying to get the python binding of mlpack by following the instructions given in README.MD .
What is the output?
On running
make -j8
, I got the following output on command line.I am pasting the small range of output(where the warning is) since there is character limit.
home/aditya/Desktop/mlpack/src/mlpack/bindings/python/print_wrapper_py.cpp: In function ‘void mlpack::bindings::python::PrintWrapperPY(const string&, const string&, const string&)’: /home/aditya/Desktop/mlpack/src/mlpack/bindings/python/print_wrapper_py.cpp:67:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char> > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 67 | for(int i=0; i<methods.size(); i++) | ~^~~~~~~~~~~~~~~ [ 88%] Linking CXX executable ../../../bin/generate_pyx_krann [ 88%] Built target generate_pyx_krann [ 88%] Building Cython binding decision_tree.so... /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release warnings.warn( /usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running build_ext cythoning mlpack/decision_tree.pyx to mlpack/decision_tree.cpp [ 88%] Linking CXX executable ../../../bin/generate_pyx_linear_regression_predict [ 88%] Built target generate_pyx_linear_regression_predict [ 88%] Building Cython binding det.so... /home/aditya/.local/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/aditya/Desktop/mlpack/build/src/mlpack/bindings/python/mlpack/decision_tree.pyx tree = Parsing.p_module(s, pxd, full_module_name)
Steps to reproduce:
This issue is already reported in the following link:
Issue 1
Issue 2
The text was updated successfully, but these errors were encountered: