[Python] ImportError: No module named sklearn (Python)

Discussão em 'Python' iniciado por Stack, Fevereiro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I wanna use scikit-learn. I have typed

    pip install -U scikit-learn
    pip3 install sklearn


    to install it; but when i type

    $ Python
    >>> import sklearn


    it returns

    ImportError: No module named sklearn


    I followed other tutorials, but it doesn't work. Furthermore, my enviroment returns this warning:


    If you have installed scikit-learn from source, please do not forget to build the package before using it: run python setup.py install or make in the source directory.
    ​

    What is the true code to type in the terminal? I tried to type python setup.py installin the terminal but it doesn't work

    Continue reading...

Compartilhe esta Página