Windows安装Theano问题解决

问题一

'conda' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

解决办法

(1)检查是否已经安装Anaconda3

如果没有安装,下载地址:Anaconda Individual Edition,点击Download后,如图:

安装对应的版本,我这边安装的是Python 3,7 64位。

如果已经安装,可能是Anaconda3的环境变量没有配置,可进入安装目录,我这里是E:\anaconda3\condabin,在该目录下打开cmd,然后敲入conda命令,如图:

表示该命令可正常使用。

问题二

在pycharm中运行theano程序,报错如下:

WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
E:\Python\lib\site-packages\theano\configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory
  warnings.warn("DeprecationWarning: there is no c++ compiler."
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.

解决方法:

打开Anaconda Prompt,如图:

分别执行如下命令:

conda install m2w64-toolchain

conda install libpython

中间遇到

Proceed ([y]/n)? y

敲入y即可。

问题三

在pycharm中运行theano程序,报错如下:

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

解决方法:

在C:\Users\你的用户名下新建.theanorc.txt文件(文件以点开头),内容如下:

[blas]
ldflags=-lblas

发布了89 篇原创文章 · 获赞 79 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/L_15156024189/article/details/105366789
今日推荐