Installing theano

2019-01-15 20:41发布

问题:

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:\Anaconda3\lib\site-packages\theano\__init__.py", line 55, in 
    from theano.compile import \

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

  File "D:\Anaconda3\lib\site-packages\theano\compile\function_module.py", line 18, in 
    import theano.compile.mode

  File "D:\Anaconda3\lib\site-packages\theano\compile\mode.py", line 11, in 
    import theano.gof.vm

  File "D:\Anaconda3\lib\site-packages\theano\gof\vm.py", line 25, in 
    in_c_key=False)

  File "D:\Anaconda3\lib\site-packages\theano\configparser.py", line 231, in AddConfigVar
    configparam.fullname)

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

What does that mean?

回答1:

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