Installing an old version of scikit-learn

Savvas Kourtis

Problem Statment

I'm trying to run some old python code that requires scikit-learn 18.0 but the current version I have installed is 0.22 and so I'm getting a warning/invalid data when I run the code.


What I've Tried

I tried installing the specific version both in the terminal: python -m pip install scikit-learn==0.18 and in conda and none of that has worked. All I can install is v 0.22. Help? Thanks.


Error In Terminal

ERROR: Failed building wheel for scikit-learn
Running setup.py clean for scikit-learn
Failed to build scikit-learn
Installing collected packages: scikit-learn
Found existing installation: scikit-learn 0.22.1
Uninstalling scikit-learn-0.22.1:
Successfully uninstalled scikit-learn-0.22.1
Running setup.py install for scikit-learn ... error
ERROR: Command errored out with exit status 1:

Error through conda environment:

PackagesNotFoundError: The following packages are not available from current channels:
- scikit-learn==0.18 this was after creating and activating the new environment

FlyingTeller

Tackling your issues one at a time:

python -m pip install scikit-learn==0.18 fails

This is probably due to the fact that scikit-learn==0.18, if you check on pypi only has whl files for python 3.5 and 2.7 for windows, therefore pip downloads the source distribution and then fails in compiling it, probably because it doesn't work with newer python versions

The following packages are not available from current channels

This happens, because scikit-learn==18.0 simply does not exist in the default conda channels. On my win64 machine, the oldesst version that I can install is 19.0 (You can check by typing conda search scikit-learn in the cmd), so unfortunately no way to install using the default conda channels. There is a channel called free (found through the anaconda website) that has scikit-learn 18.0, so you could install with:

conda install -c free scikit-learn 

To also make sure that the python version is compatible, I would just create a fitting environment:

conda create -n py35 -c free scikit-learn=0.18.0

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Installing Old Package from Old Ubuntu to New version of Ubuntu

分類Dev

installing pip on python2.7.5 and the old version issue

分類Dev

scikit learn documentation in PDF

分類Dev

Installing scikit-learn with Python3, _superlu.cpython-34m.so: undefined symbol: dtrsm_

分類Dev

Scikit-Learn Standard Scaler

分類Dev

repeated FeatureUnion in scikit-learn

分類Dev

scikit-learn StratifiedKFold implementation

分類Dev

scikit-learn:最近傍

分類Dev

scikit learnのRandomForestClassifierとExtraTreesClassifier

分類Dev

Scikit-learn tutorial documentation location

分類Dev

Scikit learn split train test for series

分類Dev

Data not persistent in scikit-learn transformers

分類Dev

Balanced Random Forest in scikit-learn (python)

分類Dev

Scikit-Learn Agglomerative Clustering Connectivity Matrix

分類Dev

Custom tokenizer for scikit-learn vectorizers

分類Dev

「KeyError:0」、xgboost、scikit-learn、pandas

分類Dev

Looping scikit-learn machine learning datasets

分類Dev

Scikit-learn tfidf vectorizer in minibatches?

分類Dev

Target transformation and feature selection in scikit-learn

分類Dev

anaconda/spyder scikit learn update 0.21.3 to 0.22.2

分類Dev

API calls from NLTK, Gensim, Scikit Learn

分類Dev

StratifiedKFold vs KFold in scikit-learn

分類Dev

StratifiedKFoldとscikit-learnのKFold

分類Dev

Scikit-Learn Not Properly Updating in IPython

分類Dev

scikit-learn Ridge Regression UnboundLocalError

分類Dev

Predict movie reviews with scikit-learn

分類Dev

scikit-learn HashingVectorizer on sparse matrix

分類Dev

problems installing and running software on an old xp machine

分類Dev

Why is setup.py installing old files?

Related 関連記事

ホットタグ

アーカイブ