2016-10-17 154 views
1

我想在windows 7上使用mingw32安裝theano。在這個過程中我必須安裝SciPy的很好,但嘗試這樣做,我得到這個錯誤消息時:theano安裝Windows mingw

### Warning: Using unoptimized lapack ### 
    ### Warning: Using unoptimized lapack ### 
    warning: no previously-included files matching '*.pyo' found anywhere in dis 
tribution 
    warning: no previously-included files matching '*.pyd' found anywhere in dis 
tribution 
    objdump.exe: C:\Windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0 
.21022.8_none_750b37ff97f4f68b\msvcr90.dll: File format not recognized 
    Looking for python27.dll 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "c:\users\22193\appdata\local\temp\pip-build-aoxj5g\scipy\setup.py", 
line 415, in <module> 
     setup_package() 
     File "c:\users\22193\appdata\local\temp\pip-build-aoxj5g\scipy\setup.py", 
line 411, in setup_package 
     setup(**metadata) 
     File "c:\python27\lib\distutils\core.py", line 111, in setup 
     _setup_distribution = dist = klass(attrs) 
     File "build\bdist.win-amd64\egg\setuptools\dist.py", line 269, in __init__ 

     File "build\bdist.win-amd64\egg\setuptools\dist.py", line 313, in fetch_bu 
ild_eggs 
     File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 826, in r 
esolve 
     File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 1092, in 
best_match 
     File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 1104, in 
obtain 
     File "build\bdist.win-amd64\egg\setuptools\dist.py", line 380, in fetch_bu 
ild_egg 
     File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 
640, in easy_install 

     File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 
670, in install_item 

     File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 
850, in install_eggs 

     File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 
1078, in build_and_install 

     File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 
1064, in run_setup 

     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 246, in run_s 
etup 
     File "c:\python27\lib\contextlib.py", line 35, in __exit__ 
     self.gen.throw(type, value, traceback) 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 195, in setup 
_context 
     File "c:\python27\lib\contextlib.py", line 35, in __exit__ 
     self.gen.throw(type, value, traceback) 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 166, in save_ 
modules 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 141, in resum 
e 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 154, in save_ 
modules 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 195, in setup 
_context 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 243, in run_s 
etup 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 273, in run 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 242, in runne 
r 
     File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 46, in _execf 
ile 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\s 
etup.py", line 386, in <module> 
     # Raise errors for unsupported commands, improve help output, etc. 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\s 
etup.py", line 378, in setup_package 
     test_suite='nose.collector', 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\n 
umpy\distutils\core.py", line 169, in setup 
     File "c:\python27\lib\distutils\core.py", line 151, in setup 
     dist.run_commands() 
     File "c:\python27\lib\distutils\dist.py", line 953, in run_commands 
     self.run_command(cmd) 
     File "c:\python27\lib\distutils\dist.py", line 972, in run_command 
     cmd_obj.run() 
     File "build\bdist.win-amd64\egg\setuptools\command\bdist_egg.py", line 160 
, in run 
     File "c:\python27\lib\distutils\cmd.py", line 326, in run_command 
     self.distribution.run_command(command) 
     File "c:\python27\lib\distutils\dist.py", line 972, in run_command 
     cmd_obj.run() 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\n 
umpy\distutils\command\build_clib.py", line 83, in run 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\n 
umpy\distutils\ccompiler.py", line 596, in new_compiler 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\n 
umpy\distutils\mingw32ccompiler.py", line 96, in __init__ 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\n 
umpy\distutils\mingw32ccompiler.py", line 360, in build_msvcr_library 
     File "c:\users\22193\appdata\local\temp\easy_install-3hk03b\numpy-1.11.2\n 
umpy\distutils\mingw32ccompiler.py", line 274, in generate_def 
    ValueError: Symbol table not found 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in c:\users\22193\ap 
pdata\local\temp\pip-build-aoxj5g\scipy\ 

C:\Python27\Scripts> 

有沒有解決辦法?我試過通過http://www.lfd.uci.edu/~gohlke/pythonlibs/安裝scipy,但是我得到了一個64位試圖與mingw32一起運行的兼容性錯誤。我已經使用mingw爲scipy構建了lapack和blas庫。

+0

在windows上scipy彙編是一個痛苦!我會強烈推薦像[anaconda](https://www.continuum.io/downloads),甚至由scipy-devs推薦。 (還有一些非官方的theano爲conda構建)。 – sascha

回答

0

在windows 7 x64上,我建議要麼使用Enthought的Canopy,如果你是學生,你可以免費獲得完整的軟件包。

或WinPython。

雖然,對於任何一個,你必須遵循的所有步驟,包括:

安裝Windows軟件開發工具包7.1版,也可以安裝最新的Visual Studio附帶了它,它帶有安裝選項微軟的Visual C++編譯器爲Python 2.7

安裝GCC TDM

但一定要檢查

http://deeplearning.net/software/theano/install_windows.html

您可能要檢查,如果你錯過任何步驟。

我以前遇到過Anaconda和Theano的問題。所以我放棄了使用它。 但是,一位朋友和Theano以及Theano也取得了成功。

只要確保在安裝之前已經正確安裝了環境和python安裝程序。

where gcc 
where gendef 
where cl 
where nvcc 

在命令提示符

此外,一定要保持檢查

http://deeplearning.net/software/theano/install_windows.html

0

我能夠通過安裝mingw64來解決這個問題而不是mingw32。