Reputation: 172
I need sklearn that's why I tried installing scikit-learn in my conda env using conda install scikit-learn
but it results in:
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- scikit-learn -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0']
Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your system:
- feature:/linux-64::__cuda==9.1=0
- feature:|@/linux-64::__cuda==9.1=0
Your installed version is: 9.1
The same appears if I try conda install -c anaconda scikit-learn
or conda install -c conda-forge scikit-learn
. How to resolve this?
Upvotes: 1
Views: 1292
Reputation: 172
Ok, so the problem was that my env was running Python 3.9.0 but scikit-learn
isn't compatible with 3.9 so I created a new env while specifically mentioning the Python version by
conda create -n newEnv python=3.7.3
. I decided to go with
python 3.7.3 as it was already present on my base environment so I just went with it.
Upvotes: 3
Reputation: 1
I have just encountered this problem, and my OS is Windows10. At first I tried to uninstall scikit-learn package and reinstall it, but it failed. Then I searched this website which focuses on python package using wheel. Luckily scikit-learn compatible with python3.9.0 now is available. After downloading the proper wheel file, I cd into the download folder and use 'pip install <wheel file name>' to install it. It worked for my situation. Wishes for you.
Upvotes: 0