0

Hello please I need your help :

I have python3.5 and i installed pandas

sudo apt-get install python3-pandas

then scikit learn :

sudo pip install -U scikit-learn

When I start to use :

from sklearn.preprocessing import OneHotEncoder

or anything related to sklearn this error appears:

No module named 'numpy.testing.decorators'

Numpy version 1.18.2 pandas version pandas==1.0.3

desertnaut
  • 57,590
  • 26
  • 140
  • 166
user8427236
  • 257
  • 1
  • 4
  • 18
  • Installing scikit-learn from source without using conda requires you to have installed the scikit-learn Python development headers and a working C/C++ compiler with OpenMP support (typically the GCC toolchain). I suggest that you install a separate Anaconda distribution, which already has sklearn from https://www.anaconda.com/distribution/ – Trenton McKinney Apr 15 '20 at 21:17
  • thank you but it is not easy for me to install anaconda now .. i have a deadline for the project – user8427236 Apr 15 '20 at 22:04
  • Anaconda doesn't take that long to download and install and is probably the easier way to resolve this issue, in my opinion. – Trenton McKinney Apr 15 '20 at 22:09
  • thank you i will give a try .. the code python will change in anaconda? The project must be in python – user8427236 Apr 15 '20 at 22:25
  • 1
    Anaconda is just a distribution of precompiled python packages. The current distribution is for python 3.7, but your code shouldn't change because you're using the Anaconda distribution. Also, this is just my recommendation, there may be alternate solutions to resolve your issue, but I don't personally know them. – Trenton McKinney Apr 15 '20 at 22:28
  • thanks a lottt your solution works for me – user8427236 Apr 16 '20 at 00:11
  • Does this answer your question? [ModuleNotFoundError: No module named 'numpy.testing.nosetester'](https://stackoverflow.com/questions/59474533/modulenotfounderror-no-module-named-numpy-testing-nosetester) – sophros Apr 29 '21 at 17:24

0 Answers0