Reputation: 4839
I am using conda with python3.6 on ubuntu 18, and trying to install sklearn version 0.2 using
conda install scikit-learn
I am getting in the process some weird massages such as this one
SafetyError: The package for scikit-learn located at /home/user/anaconda3/pkgs/scikit-learn-0.20.2-py36hd81dba3_0 appears to be corrupted. The path 'lib/python3.6/site-packages/sklearn/utils/weight_vector.cpython-36m-x86_64-linux-gnu.so' has an incorrect size. reported size: 66016 bytes actual size: 48608 bytes
then I get "done" massage and approval and when I try to import sklearn I get this error:
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy
What am I missing here? Thanks.
Upvotes: 1
Views: 857
Reputation: 1909
Create a seperate python environment for your project with this command:
conda create -n yourenvname python=3.6 scikit-learn
This should have scikit included.
Afterwards enable your environment:
conda activate yourenvname
For more information regarding conda environments link to documentation
Besides you could try conda uninstall scikit-learn
and afterwards install again
Upvotes: 2