Skip to content Skip to sidebar Skip to footer

Error Installing Scikit-learn Python3

So I was able to install sklearn for python2 but for some reason I having issues with doing the same for python3. I am getting this error: Traceback (most recent call last): File

Solution 1:

If you installed sklearn from source for Python 2.x, some of its binaries may have persisted if you didn't fully remove all sklearn files. Python 2.x and 3.x are quite incompatible with each other, so this might be a reason why it's failing to build.

A few steps to take:

  1. Consider using a virtualenv for your sklearn projects, especially if you have a lot of different packages or Python versions floating around. It's great for keeping different development environments with different Python packages and libraries isolated. Follow this guide if you don't have it already. When creating your virtualenv, make sure to install it with Python 3.x by using this command when creating your virtualenv:

    virtualenv -p python3 envname

  2. If building from source: Redownload the sklearn source for your Python 3 version and place it in your virtualenv. Closely follow all build instructions. That should hopefully give you a clean install of sklearn.

  3. If installing with pip: Activate your virtualenv, then: pip install -U scikit-learn after installing numpy and scipy.

Post a Comment for "Error Installing Scikit-learn Python3"