1. 程式人生 > >python安裝scikit-learn遇到問題彙總

python安裝scikit-learn遇到問題彙總

Numpy developers follow in general a policy of keeping a backward compatible binary interface (ABI). However, the ABI is not forward compatible.

What that means:

A package, that uses numpy in a compiled extension, is compiled against a specific version of numpy. Future version of numpy will be compatible with the compiled extension of the package (for exception see below). Distributers of those other packages do not need to recompile their package against a newer versions of numpy and users do not need to update these other packages, when users update to a newer version of numpy.

However, this does not go in the other direction. If a package is compiled against a specific numpy version, say 1.7, then there is no guarantee that the binaries of that package will work with older numpy versions, say 1.6, and very often or most of the time they will not.

The binary distribution of packages like pandas and statsmodels, that are compiled against a recent version of numpy, will not work when an older version of numpy is installed. Some packages, for example matplotlib, if I remember correctly, compile their extensions against the oldest numpy version that they support. In this case, users with the same old or any more recent version of numpy can use those binaries.

The error message in the question is a typical result of binary incompatibilities.

The solution is to get a binary compatible version, either by updating numpy to at least the version against which pandas or statsmodels were compiled, or to recompile pandas and statsmodels against the older version of numpy that is already installed.

Breaking the ABI backward compatibility:

Sometimes improvements or refactorings in numpy break ABI backward compatibility. This happened (unintentionally) with numpy 1.4.0. As a consequence, users that updated numpy to 1.4.0, had binary incompatibilities with all other compiled packages, that were compiled against a previous version of numpy. This requires that all packages with binary extensions that use numpy have to be recompiled to work with the ABI incompatible version.

大意就是我的numpy版本和scikit-learn版本不搭配,然後我解除安裝了numpy ,從numpy1.6 一直嘗試到1.8 發現1.8安裝後衝突消失。真讓人蛋疼安裝,推薦大家直接用整合的環境如:WinPython 之類的簡單配置環境,工具幫你匹配好各種包。

相關推薦

python安裝scikit-learn遇到問題彙總

Numpy developers follow in general a policy of keeping a backward compatible binary interface (ABI). However, the ABI is not forward compatible. What t

python機器學習包 Windows下 pip安裝 scikit-learn numpy scipy

1.到PIP的目錄中C:\Python34\Scripts;2. 2.1  pip安裝numpy pip install numpy 2.2  pip安裝sklearn pip install -U scikit-learn   2.3  pip安裝scipy(注:sklearn 依賴

windows下安裝scikit learn以及python的各種包

每次安裝都是不完整,這次配置又出問題,於是決定從頭開始安裝。 首先,windows7 32位的系統。 首先安裝python2.7,官網下載的,安裝路徑是c:\python2.7 因為之前雖然安裝的不完整,但是我已經配置好環境變數等引數了。具體Path新增 C:\Pyth

pythonscikit-learn 實現垃圾郵件過濾

文本挖掘(Text Mining,從文字中獲取信息)是一個比較寬泛的概念,這一技術在如今每天都有海量文本數據生成的時代越來越受到關註。目前,在機器學習模型的幫助下,包括情緒分析,文件分類,話題分類,文本總結,機器翻譯等在內的諸多文本挖掘應用都已經實現了自動化。 在這些應用中,垃圾郵件過濾算是

PythonScikit-Learn

Reference:http://mp.weixin.qq.com/s?src=3&timestamp=1474985436&ver=1&signature=at24GKibwNNoE9VsETitURyMHzXYeytp1MoUyAFx-2WOZTdPelAdJBv9n

pythonscikit-learn

官方文件:http://scikit-learn.org/stable/# input--模型-output 資料分析是為了發現規則 資料分析--資料探勘和機器學習,演算法相同 推薦系統 語音識別--科大訊飛,百度壟斷,比較成熟,自然語言的分支 機器視覺--卷積神經網路,影象

ubuntu16.04 install 安裝 scikit-learn

在ubuntu系統中安裝python3對應的scikit-learn庫 安裝scikit-learn庫(環境:python3 、ubuntu14.04) sudo apt-get install build-essential python3-dev python3-setupt

在Windows下將pythonscikit learn的模型轉化為PMML檔案

最近專案需要將python中訓練好的模型轉移到Java中使用,所以在網上查到了PMML可以實現這個功能,那麼本文將介紹在Windows下如何將python中scikit learn的模型轉化為PMML檔案,從而方便將訓練好的模型供其他語言使用。 何為PMM

[python] 使用scikit-learn工具計算文字TF-IDF值

轉載自:http://blog.csdn.net/liuxuejiang158blog/article/details/31360765 TF-IDF簡要介紹 (來自:http://blog.csdn.net/eastmount/article/details/50323063)

Windows下安裝Scikit-learn

官方給出的scikit-learn user guide Release 0.18.1 中提到所依賴的包有 Scikit-learn requires: • Python (>= 2.6 or >= 3.3), • NumPy (>= 1.6.1),

Linux下安裝scikit-learn

[email protected]:~$ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or

Python安裝遇到的問題彙總(持續更新)

Python安裝遇到的問題彙總 1.安裝 padans_datareader 在Anaconda 中搜索安裝或者執行命令安裝: 匯入pandans_datareader報錯問題: 參考解決:ImportError: cannot import n

安裝scikit-learn及可能遇到的問題

安裝scikit-learn之前要依次安裝Numpy,Scipy,Matlotlib這幾個庫,每個庫之間有依賴關係,依次安裝順序不能顛倒。安裝額外的庫可以用pip,easy_install和Windows installer。 在python3.4版本及以後版本預設安裝了e

pythonScikit-learn中用決策樹和隨機森林預測NBA獲勝者

在本文中,我們將以Scikit學習的決策樹和隨機森林預測NBA獲勝者。美國國家籃球協會(NBA)是北美主要的男子職業籃球聯賽,被廣泛認為是首屈一指的男子職業籃球聯賽在世界上。它有30個團隊(美國29個,

Ubuntu下安裝scikit-learn(sklearn)

按說,這個安裝應該也不是很困難,但是官方網站的說明在我看來寫的實在是有待改進,所以寫文一篇,方便以後安裝。 背景: Ubuntu 13.04 python 2 .7. 4(系統預裝) 步驟: 1. 安裝支援部分: 在terminal裡面直接輸入以下命令,這個命令會安

python安裝Eric6各種問題彙總

漫漫程式設計路,環境最困難。配置好環境是最令人痛苦的事。 2018年9月20日提醒:python 3.7及以後版本中移除了pyqt5-tools。暫時沒有較好的解決方案,建議安裝python3.6來規避這個問題。 據稱,pyqt5-tools集合到Annacoda中,建議

pip使用,由pip安裝scikit-learn

pip pip 是一個安裝和管理 Python 包的工具 , 是 easy_install 的一個替換品。 Ubuntu14.04 下pip 的安裝方法: sudo apt-get install python-pip 安裝套件: pip in

ubuntu 安裝 scikit-learn的注意事項

1、主要python的版本 scikit-learn is tested to work underPython 2.6, Python 2.7, and Python 3.4. (using the same codebase thanks to an embedded

python開發學習記錄--Numpy、Scipy、Matplotlib、Scikit-learn等庫的安裝

其實很簡單,在git bash中,輸入: [email protected] MINGW64 /d/SoftWare/Python/Python37/Scripts $ pip install numpy $ pip install matplotlib 看到Successful

Python的機器學習庫scikit-learn、繪相簿Matplotlib的安裝

在windows環境下安裝scipy和sklearn是一件比較麻煩的事情。由於sklearn依賴於numpy和scipy,所以安裝sklearn之前需要先安裝numpy和scipy庫,然而使用pip安裝安裝時,pip install numpy 可以安裝成功,但是使用命令p