2016-05-01 20 views
1


がscikit-学ぶ

をインストールすることはできません私は、学ぶscikitをインストールしたかったが、私はそれを行うことはできません。私は最新のFedoraを使用します。 scikit-learnをインストールするには、私はそうします。

pip install scikit-learn 

私はエラーを受け取ります

g++ -pthread -shared -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld build/temp.linux-x86_64-3.4/sklearn/svm/liblinear.o build/temp.linux-x86_64-3.4/sklearn/svm/src/liblinear/tron.o build/temp.linux-x86_64-3.4/sklearn/svm/src/liblinear/linear.o -L/usr/lib64/atlas -L/usr/lib64 -Lbuild/temp.linux-x86_64-3.4 -lcblas -lm -lpython3.4m -o build/lib.linux-x86_64-3.4/sklearn/svm/liblinear.cpython-34m.so 
    /usr/bin/ld: cannot find -lcblas 
    collect2: error: ld returned 1 exit status 
    Partial import of sklearn during the build process. 
    error: Command "g++ -pthread -shared -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld build/temp.linux-x86_64-3.4/sklearn/svm/liblinear.o build/temp.linux-x86_64-3.4/sklearn/svm/src/liblinear/tron.o build/temp.linux-x86_64-3.4/sklearn/svm/src/liblinear/linear.o -L/usr/lib64/atlas -L/usr/lib64 -Lbuild/temp.linux-x86_64-3.4 -lcblas -lm -lpython3.4m -o build/lib.linux-x86_64-3.4/sklearn/svm/liblinear.cpython-34m.so" failed with exit status 1 
    /usr/bin/ld: cannot find -lcblas 
    collect2: error: ld returned 1 exit status 

    ---------------------------------------- 
Command "/home/mstankiewicz/.virtualenvs/sus/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-4scm2pb_/scikit-learn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8fh7u6fy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/mstankiewicz/.virtualenvs/sus/include/site/python3.4/scikit-learn" failed with error code 1 in /tmp/pip-build-4scm2pb_/scikit-learn 

私はGoogleで見つけたとして、私はアトラスをインストールしようとしたが、それは

sudo dnf -y install atlas3gf-base atlas-devel 

答えて

-1

を助けなかったあなたが最初にいくつかの依存関係をインストールする必要があるかもしれません。

sudo dnf install atlas lapack atlas-devel blas-devel gcc-gfortran jupyter ipython fftw fftw-devel 

編集:ベストプラクティスは、仮想Python環境の管理を使用することです。あなたはそれを行うためにAnnacondaをインストールすることができます。

+0

それはまだ、十分に同じ依存関係の問題ではありません。 – Sylvain

+0

@シルバンおそらく、あなたはアナコンダを試すことができます。私にとってはベストプラクティスです。 –

+0

ファブリックを介してリモートで展開する必要があるため、anacondaはまだオプションではありません。私はFedoraを削除し、代わりにUbuntu gnomeをインストールしました。それがトリックでした。 – Sylvain

1

同様の問題がFedora 24にインストールされました。

Atlasがライブラリを変更しました。 Fedora Mailing listを参照してください。

ありがたいことに、Fedoraのレポでのパッケージがあり、実行します。

# dnf install python2-scikit-learn.x86_64 
+0

これはpython3でもうまくいきます: 'dnf install python3-scikit-learn' しかし、まだpipからインストールする方法を探しています... – Sylvain