安装 theano [英] Installing theano

查看:28
本文介绍了安装 theano的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过运行pip install theano"在 Windows 7 64 位上安装了带有 Spyder 2.3.8 的 theano.它运作良好.但是,当我尝试运行import theano"时,出现以下错误:

<前>回溯(最近一次调用最后一次):文件",第 1 行,在进口theano文件D:Anaconda3libsite-packages heano\__init__.py",第 55 行,在从 theano.compile 导入 文件D:Anaconda3libsite-packages heanocompile\__init__.py",第 9 行,在从 theano.compile.function_module 导入 *文件D:Anaconda3libsite-packages heanocompilefunction_module.py",第 18 行,在导入 theano.compile.mode文件D:Anaconda3libsite-packages heanocompilemode.py",第 11 行,在导入 theano.gof.vm文件D:Anaconda3libsite-packages heanogofvm.py",第 25 行,在in_c_key=假)文件D:Anaconda3libsite-packages heanoconfigparser.py",第 231 行,在 AddConfigVar 中configparam.fullname)AttributeError: ('这个名字已经被占用', 'profile')

这是什么意思?

解决方案

您使用 Spyder 有什么原因吗?

在 Windows 7 x64 上,我建议您使用 Enthought 的 Canopy,如果您是学生,则可以免费获得完整的软件包.

或者,我之前也使用过 WinPython,它运行良好.尽管您必须遵循所有步骤,包括:

安装 Windows 软件开发工具包 7.1 版,或者您可以安装它附带的最新 Visual Studio,它附带一个选项来安装适用于 Python 2.7 的 Microsoft Visual C++ 编译器

安装 TDM GCC

但一定要检查

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

您可能想检查是否遗漏了任何步骤.

我之前在使用 Anaconda 和 Theano 时遇到过问题.所以我放弃了使用它.然而,一位朋友用它和 Theano 也取得了成功.

在安装 theano 之前,请确保您已正确安装环境和 python 设置.

在做

where gcc哪里基因哪里哪里 nvcc

在命令提示符上可能会显示一些东西...

我不是 GCC 专家,但根据上面用户提供的链接,我读到一个朋友说它与 GCC 相关.所以,是的,我建议你按照我说的重新检查.

使用该信息编辑问题,我可能能够帮助更多人,其他人也能提供帮助.

@CantFindName

Theano 中的名称冲突

I installed theano with Spyder 2.3.8 on Windows 7 64-bit by running "pip install theano". It worked well. But then, when I tried to run "import theano", I got the following error:

Traceback (most recent call last):

  File "", line 1, in 
    import theano

  File "D:Anaconda3libsite-packages	heano\__init__.py", line 55, in 
    from theano.compile import 

  File "D:Anaconda3libsite-packages	heanocompile\__init__.py", line 9, in 
    from theano.compile.function_module import *

  File "D:Anaconda3libsite-packages	heanocompilefunction_module.py", line 18, in 
    import theano.compile.mode

  File "D:Anaconda3libsite-packages	heanocompilemode.py", line 11, in 
    import theano.gof.vm

  File "D:Anaconda3libsite-packages	heanogofvm.py", line 25, in 
    in_c_key=False)

  File "D:Anaconda3libsite-packages	heanoconfigparser.py", line 231, in AddConfigVar
    configparam.fullname)

AttributeError: ('This name is already taken', 'profile')

What does that mean?

解决方案

Is there a reason you are using Spyder?

On windows 7 x64, I would advise to either use Canopy from Enthought, which, if you are a student , you can get the complete package for free.

Or, i also used WinPython before, it worked fine. Although you have to follow all steps, including :

Installing Windows Software Development Kit version 7.1 or you can install the newest Visual Studio which comes with it and it comes with an option to install Microsoft Visual C++ Compiler for Python 2.7

Installing TDM GCC

But be sure to check

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

You might wanna check if you missed any steps.

I had problems with Anaconda and Theano before. So i gave up on using it. However a friend had success with it and Theano as well.

Just be sure you have your environment and python setup installed properly prior to theano install.

Doing

where gcc
where gendef
where cl
where nvcc

on the Command Prompt Might reveal something...

Im not a GCC specialist, but according from the link from the user above, i read a friend saying its something related to GCC. So, yes, i suggest you re-check as i said .

Edit the question with that info and i might be able to help more and so will others.

@CantFindName

Name conflicting in Theano

这篇关于安装 theano的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆