2016-11-03 171 views
1

拉我的頭髮在這裏,約8小時,那種絕望的這個...困難安裝Theano在64位的Windows 10系統,Python 3中

基本上運行時,我得到了下面的跟蹤「進口theano 「從Python命令行:

Problem occurred during compilation with the command line below: 
"C:\Users\User Name\Anaconda3\Scripts\g++.bat" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Users\User Name\Anaconda3\lib\site-packages\numpy\core\include" -I"C:\Users\User Name\Anaconda3\include" -I"C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof" -L"C:\Users\User Name\Anaconda3\libs" -L"C:\Users\User Name\Anaconda3" -o C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp -lpython34 
g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file or directory 
g++.exe: error: C:\Users\Charles: No such file or directory 
g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp: No such file or directory 

Traceback (most recent call last): 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module> 
    raise ImportError() 
ImportError 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module> 
    raise ImportError() 
ImportError 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\__init__.py", line 70, in <module> 
    from theano.compile import (
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\compile\__init__.py", line 10, in <module> 
    from theano.compile.function_module import * 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\compile\function_module.py", line 21, in <module> 
    import theano.compile.mode 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\compile\mode.py", line 10, in <module> 
    import theano.gof.vm 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\vm.py", line 659, in <module> 
    from . import lazylinker_c 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module> 
    preargs=args) 
    File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\cmodule.py", line 2323, in compile_str 
    (status, compile_stderr.replace('\n', '. '))) 
Exception: Compilation failed (return status=1): g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file or direc. g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_Genui. Intel-3.4.5-64\lazylinker_ext\mod.cpp: No such file or directory 

我試圖在這一點上十幾在線教程,所以我會去通過什麼我到目前爲止/安裝完成。

系統規格: 操作系統名稱:的Microsoft Windows 10家 系統類型:基於x64的PC BIOS模式:UEFI

安裝Python [巨蟒-V]: 的Python 3.4.5 ::蟒蛇定製( 64位)

PYTHON包安裝[暢達列表]:

# packages in environment at C:\Users\User Name\Anaconda3: 
# 
_license     1.1      py34_1 
alabaster     0.7.9     py34_0 
anaconda     custom     py34_0 
anaconda-client   1.5.3     py34_0 
argcomplete    1.0.0     py34_1 
astropy     1.2.1    np111py34_0 
babel      2.3.4     py34_0 
backports_abc    0.4      py34_0 
bcolz      1.0.0     py34_0 
beautiful-soup   4.3.2     py34_1 
binstar     0.12       2 
bitarray     0.8.1     py34_1 
blaze-core    0.9.0     py34_0 
blz      removed      0 
bokeh      0.12.3     py34_1 
boto      2.43.0     py34_0 
bottleneck    1.1.0    np111py34_0 
bzip2      1.0.6     vc10_3 [vc10] 
certifi     2016.2.28    py34_0 
cffi      1.8.3     py34_0 
click      6.6      py34_0 
clyent     1.2.2     py34_0 
colorama     0.3.7     py34_0 
comtypes     1.1.2     py34_0 
conda      4.2.12     py34_0 
conda-build    2.0.7     py34_0 
conda-env     2.6.0       0 
configobj     5.0.6     py34_0 
cryptography    1.5.2     py34_0 
cycler     0.10.0     py34_0 
cython     0.25.1     py34_0 
cytoolz     0.8.0     py34_0 
datashape     0.5.2     py34_0 
decorator     4.0.10     py34_0 
Django     1.10.2     <pip> 
docutils     0.12      py34_2 
dynd-python    removed      0 
entrypoints    0.2.2     py34_0 
et_xmlfile    1.0.1     py34_0 
fastcache     1.0.2     py34_1 
filelock     2.0.6     py34_0 
flask      0.11.1     py34_0 
freetype     2.5.5     vc10_1 [vc10] 
greenlet     0.4.10     py34_0 
h5py      2.6.0    np111py34_2 
hdf5      1.8.15.1     vc10_4 [vc10] 
idna      2.1      py34_0 
imagesize     0.7.1     py34_0 
ipykernel     4.5.0     py34_0 
ipython     5.1.0     py34_0 
ipython-notebook   4.0.4     py34_3 
ipython-qtconsole   4.0.1     py34_4 
ipython_genutils   0.1.0     py34_0 
itsdangerous    0.24      py34_0 
jdcal      1.3      py34_0 
jedi      0.9.0     py34_1 
jinja2     2.8      py34_1 
jpeg      8d      vc10_2 [vc10] 
jsonschema    2.5.1     py34_0 
jupyter_client   4.4.0     py34_0 
jupyter_core    4.2.0     py34_0 
Lasagne     0.1      <pip> 
launcher     1.0.0       4 
libpng     1.6.22     vc10_0 [vc10] 
libpython     3.4.3      <pip> 
libpython     2.0      py34_0 
libtiff     4.0.6     vc10_2 [vc10] 
llvmlite     0.14.0     py34_0 
lxml      3.6.4     py34_0 
m2w64-binutils   2.25.1      4 
m2w64-bzip2    1.0.6       5 
m2w64-crt-git    5.0.0.4636.2595836    1 
m2w64-gcc     5.3.0       5 
m2w64-gcc-ada    5.3.0       5 
m2w64-gcc-fortran   5.3.0       5 
m2w64-gcc-libgfortran  5.3.0       5 
m2w64-gcc-libs   5.3.0       6 
m2w64-gcc-objc   5.3.0       5 
m2w64-gmp     6.1.0       1 
m2w64-headers-git   5.0.0.4636.c0ad18a    1 
m2w64-isl     0.16.1      1 
m2w64-libiconv   1.14       5 
m2w64-libmangle-git  5.0.0.4509.2e5a9a2    1 
m2w64-libwinpthread-git 5.0.0.4634.697f757    1 
m2w64-make    4.1.2351.a80a8b8    1 
m2w64-mpc     1.0.3       2 
m2w64-mpfr    3.1.4       3 
m2w64-pkg-config   0.29.1      1 
m2w64-toolchain   5.3.0       6 
m2w64-tools-git   5.0.0.4592.90b8472    1 
m2w64-windows-default-manifest 6.4       2 
m2w64-winpthreads-git  5.0.0.4634.697f757    1 
m2w64-zlib    1.2.8       9 
markupsafe    0.23      py34_2 
matplotlib    1.5.1    np111py34_0 
menuinst     1.4.2     py34_1 
mingw      4.7       1 
mistune     0.7.3     py34_0 
mkl      11.3.3      1 
mkl-service    1.1.2     py34_2 
mock      2.0.0     py34_0 
mpmath     0.19      py34_1 
msys2-conda-epoch   20160418      0 
multipledispatch   0.4.9     py34_0 
mysqlclient    1.3.7      <pip> 
nbconvert     4.2.0     py34_0 
nbformat     4.1.0     py34_0 
networkx     1.11      py34_0 
nltk      3.2.1     py34_0 
node-webkit    0.10.1      0 
nose      1.3.7     py34_1 
notebook     4.2.3     py34_0 
numba      0.29.0    np111py34_0 
numexpr     2.6.1    np111py34_1 
numpy      1.11.2     py34_0 
odo      0.5.0     py34_1 
openpyxl     2.4.0     py34_0 
openssl     1.0.2j     vc10_0 [vc10] 
pandas     0.19.0    np111py34_0 
path.py     8.2.1     py34_0 
patsy      0.4.1     py34_0 
pbr      1.10.0     py34_0 
pep8      1.7.0     py34_0 
pickleshare    0.7.4     py34_0 
pillow     3.4.2     py34_0 
pip      8.1.2     py34_0 
pip      9.0.0      <pip> 
pip      8.1.2      <pip> 
pkginfo     1.3.2     py34_0 
ply      3.9      py34_0 
prompt_toolkit   1.0.8     py34_0 
psutil     4.4.2     py34_0 
psycopg2     2.6.2      <pip> 
py      1.4.31     py34_0 
pyasn1     0.1.9     py34_0 
pycosat     0.6.1     py34_1 
pycparser     2.16      py34_0 
pycrypto     2.6.1     py34_4 
pyflakes     1.3.0     py34_0 
pygments     2.1.3     py34_0 
pyopenssl     16.0.0     py34_0 
pyparsing     2.1.4     py34_0 
pyqt      4.11.4     py34_7 
pyreadline    2.1      py34_0 
pytables     3.2.2    np111py34_4 
pytest     3.0.3     py34_0 
python     3.4.5       0 
python-dateutil   2.5.3     py34_0 
pytz      2016.7     py34_0 
pywin32     220      py34_1 
pyyaml     3.12      py34_0 
pyzmq      16.0.0     py34_0 
qt      4.8.7     vc10_9 [vc10] 
qtconsole     4.2.1     py34_0 
requests     2.11.1     py34_0 
rope      0.9.4     py34_1 
ruamel_yaml    0.11.14     py34_0 
runipy     0.1.3     py34_0 
scikit-image    0.12.3    np111py34_1 
scikit-learn    0.17.1     <pip> 
scikit-learn    0.18    np111py34_0 
scikit-neuralnetwork  0.7      <pip> 
scipy      0.18.1    np111py34_0 
setuptools    27.2.0     py34_1 
simplegeneric    0.8.1     py34_1 
sip      4.18      py34_0 
six      1.10.0     py34_0 
snowballstemmer   1.2.1     py34_0 
sockjs-tornado   1.0.3     py34_0 
sphinx     1.4.8     py34_0 
sphinx_rtd_theme   0.1.9     py34_0 
spyder     2.3.8     py34_1 
spyder-app    2.3.8     py34_0 
sqlalchemy    1.1.3     py34_0 
statsmodels    0.6.1    np111py34_1 
sympy      1.0      py34_0 
Theano     0.9.0.dev4    <pip> 
theano     0.8.2     py34_0 
tk      8.5.18     vc10_0 [vc10] 
toolz      0.8.0     py34_0 
tornado     4.4.2     py34_0 
traitlets     4.3.1     py34_0 
ujson      1.35      py34_0 
vs2010_runtime   10.00.40219.1     2 
wcwidth     0.1.7     py34_0 
werkzeug     0.11.11     py34_0 
wheel      0.29.0     py34_0 
win_unicode_console  0.5      py34_0 
xlrd      1.0.0     py34_0 
xlsxwriter    0.9.3     py34_0 
xlwings     0.10.0     py34_0 
xlwt      1.1.2     py34_0 
zlib      1.2.8     vc10_3 [vc10] 

安裝的程序(我認爲那些是相關的):

  • 的Microsoft .NET Framework 4.5 SDK
  • 的Microsoft .NET Framework 4.6 SDK
  • 的Microsoft .NET Framework 4.6.1 SDK
  • 的Microsoft Visual C++ 2005可再發行
  • 微軟的Visual C++ 2008可再發行
  • Microsoft Visual C++ 2010 Redistributable
  • Microsoft Visual C++ 2012 Redistributable
  • 微軟的Visual C++ 2013可再發行
  • 微軟的Visual C++ 2015年可再發行
  • 微軟的Visual C++編譯器2010 SP1標準
  • 微軟的Visual Studio社區2015年更新
  • 微軟的Visual Studio Express的2012年Windows桌面
  • 的Microsoft Visual Studio Express 2015 for Windows Desktop
  • 適用於Windows 7的Microsoft Windows SDK(7.1)
  • NVIDIA CUDA工具包5.5
  • NVIDIA圖形驅動程序354.74
  • TDM-GCC

的環境變量(回波%PATH%):

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\SASHome\SASFoundation\9.4\ets\sasexe;C:\Program Files\SASHome\Secure\ccme4;C:\Program Files\SASHome\x86\Secure\ccme4;C:\Program Files (x86)\PharosSystems\Core;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\Skype\Phone\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Users\User Name\Anaconda3;C:\Users\User Name\Anaconda3\Scripts;C:\Users\User Name\AppData\Roaming\npm;C:\Users\User Name\AppData\Local\Microsoft\WindowsApps;C:\TDM-GCC-64\x86_64-w64-mingw32\bin;C:\blaslapack;Name=THEANO_FLAGS, Value=floatX=float32,device=cpu,blas.ldflags=-LC:/blaslapack -lblas;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin 

任何幫助將是非常,非常非常理解!!!!

請讓我知道是否需要更多的信息進行正確的診斷。

編輯1:

的錯誤我得到了下面貼在AndrejŽukov-Gregorič下面的教程:

Problem occurred during compilation with the command line below: 
C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\numpy\core\include" -I"C:\Users\User Name\Anaconda3\envs\py34\include" -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof" -L"C:\Users\User Name\Anaconda3\envs\py34\libs" -L"C:\Users\User Name\Anaconda3\envs\py34" -o C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp -lpython34 
'C:\Users\User' is not recognized as an internal or external command, 
operable program or batch file. 

Traceback (most recent call last): 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module> 
    raise ImportError() 
ImportError 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module> 
    raise ImportError() 
ImportError 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\__init__.py", line 70, in <module> 
    from theano.compile import (
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\__init__.py", line 10, in <module> 
    from theano.compile.function_module import * 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\function_module.py", line 21, in <module> 
    import theano.compile.mode 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\mode.py", line 10, in <module> 
    import theano.gof.vm 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\vm.py", line 659, in <module> 
    from . import lazylinker_c 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module> 
    preargs=args) 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\cmodule.py", line 2323, in compile_str 
    (status, compile_stderr.replace('\n', '. '))) 
Exception: Compilation failed (return status=1): 'C:\Users\User' . operable program or batch file.or external command, 

編輯2:

OK,所以我搞砸了我.theanorc文件......我有:

[global] 
cxx=C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe 

而不是

[global] 
cxx="C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe" 

不過,現在我得到了以下錯誤:

Problem occurred during compilation with the command line below: 
"C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\numpy\core\include" -I"C:\Users\User Name\Anaconda3\envs\py34\include" -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof" -L"C:\Users\User Name\Anaconda3\envs\py34\libs" -L"C:\Users\User Name\Anaconda3\envs\py34" -o C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp -lpython34 
g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file or directory 
g++.exe: error: C:\Users\User: No such file or directory 
g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp: No such file or directory 

Traceback (most recent call last): 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module> 
    raise ImportError() 
ImportError 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module> 
    raise ImportError() 
ImportError 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\__init__.py", line 70, in <module> 
    from theano.compile import (
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\__init__.py", line 10, in <module> 
    from theano.compile.function_module import * 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\function_module.py", line 21, in <module> 
    import theano.compile.mode 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\mode.py", line 10, in <module> 
    import theano.gof.vm 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\vm.py", line 659, in <module> 
    from . import lazylinker_c 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module> 
    preargs=args) 
    File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\cmodule.py", line 2323, in compile_str 
    (status, compile_stderr.replace('\n', '. '))) 
Exception: Compilation failed (return status=1): g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file. g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mo. cpp: No such file or directory 

回答

0

我能爲Python 3在我的Windows 10機器GPU支持安裝Theano。對我來說,我發現the most helpful guide to be this one,我非常小心地跟着它。

如果你正在尋找更多的靈感,你可以嘗試下面的鏈接,但我會強烈建議只有跟上面鏈接的教程alt-link-1alt-link-2

祝你好運。

1

安裝theano:

  1. 設置Anaconda - Python語言的開源免費的分佈。它帶有conda,它自己的軟件包管理器。從Anaconda的網站下載64位python 3.x安裝程序並安裝它。
  2. 通過運行conda create -n py34 python=3.4 anaconda安裝python 3.4環境(我聽說有人遇到3.5問題)。要從默認的python 3.x環境切換到3.4,只需運行activate py34
  3. 運行conda install mingw libpython這會在您的py34環境中安裝一個C++編譯器。
  4. 結帳theano的最新出血版本。去Theano的github page,點擊Clone or download > Downdload ZIP
  5. 運行pip --no-cache-dir install theano-master.zip。 (在撰寫本文時,conda不包含theano,因此您必須使用pip來安裝它。)--no-cache-dir標誌的原因是強制執行全新安裝並防止pip使用以前緩存的theano文件。
  6. 創建一個名爲.theanorc的空白文件,並將其放置在您的主目錄(通常爲C:\Users\username)上。填入以下內容:

    [global] 
    cxx=C:\<path_to_anaconda>\Anaconda3\envs\py34\MinGW\bin\g++.exe 
    

    這告訴theano在哪裏可以找到C++編譯器。

  7. 添加g ++。exe文件到您的環境路徑

提示:

  1. 一個不錯的Linux控制檯仿真器的Windows,因爲Windows命令提示符只是惱人的一段:cmdr - 使用在你的暢達命令等進入
  2. How to set environment variables在windows中 - 實質上,將;C:\<path_to_anaconda>\Anaconda3\envs\py34\MinGW\bin\g++.exe添加到您的路徑的末尾。
+0

我跟着這個,當我運行'activate py34','python'和'import theano'時出現新的錯誤。 (注意,一旦我改變了環境變量,通過運行'echo%PATH%'確認我確實重新啓動了命令提示符)。我將發佈錯誤作爲對原始問題的編輯。 – user3684314

+0

等待等待...我搞砸了,但我仍然得到一個不同的錯誤持有... – user3684314

+0

添加上面的錯誤(編輯2) – user3684314

相關問題