我想安裝scikit-learn,但是我做不到。我使用最新的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
我試過,因爲我在谷歌找到安裝圖集,但它並沒有幫助
sudo dnf -y install atlas3gf-base atlas-devel
這是不夠的,還是一樣的依賴性問題。 – Sylvain
@Sylvain也許你可以試試Annaconda。這是我的最佳做法。 –
我需要通過結構進行遠程部署,所以anaconda不是一種選擇。我刪除了Fedora並安裝了Ubuntu gnome。那就是訣竅。 – Sylvain