2016-04-29 61 views
2

我已經安裝了2 Python庫:安裝問題Gensim庫的Python 3.4:http://www.lfd.uci.edu/~gohlke/pythonlibs/

  1. NumPy的 - 1.10.4

  2. SciPy的 - 0.17.0或更新

需要哪些成功安裝gensim作爲中所述:https://radimrehurek.com/gensim/install.html。我用http://www.lfd.uci.edu/~gohlke/pythonlibs/的wheel文件在python 3.4上安裝在Windows 7 64位機器上。我遇到了某些兼容性問題。

C:\Users\888537>py -m pip install gensim-0.12.4-cp34-none-win_amd64.whl   
    Processing c:\users\888537\gensim-0.12.4-cp34-none-win_amd64.whl 
    Collecting numpy>=1.3 (from gensim==0.12.4)           
    Using cached numpy-1.11.0-cp34-none-win_amd64.whl         
    Collecting smart-open>=1.2.1 (from gensim==0.12.4)         
    Using cached smart_open-1.3.2.tar.gz            
    Complete output from command python setup.py egg_info:       
    D:\Program Files\Python\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'install_requires'             warnings.warn(msg)                
    D:\Program Files\Python\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'test_suite'               
    warnings.warn(msg)                
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]      
    or: -c --help [cmd1 cmd2 ...]              
    or: -c --help-commands               
    or: -c cmd --help                                    
    error: invalid command 'egg_info'                                ---------------------------------------- 

錯誤:命令 「蟒蛇setup.py egg_info」 用C失敗,錯誤代碼1:\用戶\ 888537 \應用程序數據\本地的\ Temp \ PIP-集結7zxq63k_ \智能開\

在點安裝過程中發生的情況也是如此:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\888537\A 
ppData\Local\Temp\pip-build-4o3kecba\gensim\ 

有沒有辦法從git repo安裝以外的其他方法?我嘗試從git倉庫導入也沒有成功。 :P

C:\Users\888537>py -m pip install -e git+ssh://[email protected]/piskvorky/gensim.g 
it 
--editable=git+ssh://[email protected]/piskvorky/gensim.git is not the right format 
; it must have #egg=Package 
+0

爲什麼你不能只是'pip安裝gensim'?我現在試過了,我得到了gensim == 0.12.4 – Paul

+0

在pip安裝過程中出現的錯誤是:命令「python setup.py egg_info」失敗,錯誤代碼1在C:\ Users \ 888537 \ A ppData \ Local \ Temp \ pip-build-4o3kecba \ gensim \ –

回答

0

你能試試嗎?

pip install --upgrade setuptools 

然後

pip install gensim 
+0

Hello Paul,「python setup.py egg_info」失敗,錯誤代碼1在C:\ Users \ 888537 \ A ppData \ Local \ Temp \ pip-build- 4o3kecba \ gensim \「是終止使用pip安裝gensim軟件包的錯誤代碼,因此pip安裝不成功。 –

-1

我找到了答案,我question.The PIP封裝gensim失敗,因爲依賴httpretty試圖打印到非UTF-8語言環境和安裝的依賴SciPy無法找到OpenBLAS/Lapack-Libraries。 Reference:

我試過的步驟來解決這個按職位: Does Python SciPy need BLAS?

不過,我決定轉移到蟒蛇與gensim庫編程代碼。

+0

在Anacondas,gensim庫成功安裝了一個安裝了httpretty打印機的語句」conda install gensim「以及一次成功安裝gensim的所有相關文件。 –