How to install Theano on Anaconda Python 2.7 x64 on Windows?

前端 未结 4 1628
天涯浪人
天涯浪人 2020-12-05 02:49

I wonder how to install Theano on Anaconda Python 2.7 x64 on Windows 7 x64. The Theano website provides some instructions but is not clear as to what is specific to Anaconda

4条回答
  •  悲&欢浪女
    2020-12-05 03:32

    If you need Theano on python 2.7 and you already installed Anaconda, you can type the following in a command prompt:

    conda create -n Python_27 python=2.7.16
    conda activate Python_27
    conda install numpy=1.12 scipy mkl-service libpython
    conda install theano 
    

    It appears that the windows python 2.7 numpy packages don't include the _mklinit patch. Either set the MKL_THREADING_LAYER in your env or update to python 3 which does have patched packages. You can type in your env:

    python
    import os
    os.environ["MKL_THREADING_LAYER"] = "GNU"
    

提交回复
热议问题