1. 安装anaconda
下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
参考:
https://www.jianshu.com/p/62f155eb6ac5
https://blog.csdn.net/co_zy/article/details/77412610
2. 设置虚拟环境
(base) C:\Users\Administrator>conda create-p=E:\env\myenv --clone base
(base) C:\Users\Administrator>condaactivate E:\env\myenv
(E:\env\myenv) C:\Users\Administrator>E:
(E:\env\myenv) E:\>cd env
(E:\env\myenv) E:\env>conda list
3. 安装theano
(E:\env\myenv) E:\env>conda install--name E:\env\myenv mingw libpython (翻墙)
(E:\env\myenv) E:\env>conda install--name E:\env\myenv theano
4. 设置系统环境变量
设置系统环境变量参考:
https://stackoverflow.com/questions/47801775/python-theano-import-error-mkl-threading-layer-gnu
参考部分5. 测试
(E:\env\myenv) C:\Users\Administrator>python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano
>>> theano.test()
======================================================================
ERROR: Failure: ModuleNotFoundError (Nomodule named 'parameterized')
----------------------------------------------------------------------
解决方法:
(E:\env\myenv) C:\Users\Administrator>conda install -n E:\env\myenv parameterized
参考:
https://www.cnblogs.com/hdu-zsk/p/5950924.html
没报错,证明安装成功。
6. 启动Jupyter,出现问题
错误(base) C:\Users\Administrator>activate E:/env/myenv
(E:\env\myenv) C:\Users\Administrator>conda install -n E:\env\myenv nodejs
参考:
https://zhuanlan.zhihu.com/p/35180785
网友评论