Discussion:
[theano-users] raise ImportError() on calling import theano
Kamil Szynkarczuk
2018-01-05 13:58:57 UTC
Permalink
Hi all,

I'm having trouble getting started with Theano. Would someone be able to
help me with what I'm doing incorrectly?

Description of my problem

When I install and try to import theano, I get an error. I've tried
installing using conda, pip/pypi, and the bleeding edge installation using
pip/git. My numpy and scipy version may be too new as I'm using
1.14.0rc1+mkl and 1.0.0 respectively, but was unable to downgrade to the
required versions as scipy failed to compile as it requires numpy+mkl, and
a version as old as required by theano is no longer available here
https://www.lfd.uci.edu/~gohlke/pythonlibs/.

*Here is the code snippet that generates the error:*
`import theano`

*I installed the bleeding edge version using*
'C:\Downloads>pip install
git+https://github.com/Theano/Theano.git#egg=Theano'


Console output and traceback

C:\Anaconda3\python.exe "C:/Users/kszynkarczuk_stm/PycharmProjects/Bayesian
Inference Example/Example.py"
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line
75, in <module>
raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line
92, in <module>
raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:/Users/kszynkarczuk_stm/PycharmProjects/Bayesian Inference
Example/Example.py", line 4, in <module>
import theano
You can find the C code in this temporary file:
C:\Users\KSZYNK~1\AppData\Local\Temp\theano_compilation_error_np4cnd31
File "C:\Anaconda3\lib\site-packages\theano\__init__.py", line 110, in
<module>
from theano.compile import (
File "C:\Anaconda3\lib\site-packages\theano\compile\__init__.py", line
12, in <module>
from theano.compile.mode import *
File "C:\Anaconda3\lib\site-packages\theano\compile\mode.py", line 11, in
<module>
import theano.gof.vm
File "C:\Anaconda3\lib\site-packages\theano\gof\vm.py", line 673, in
<module>
from . import lazylinker_c
File "C:\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line
127, in <module>
preargs=args)
File "C:\Anaconda3\lib\site-packages\theano\gof\cmodule.py", line 2359,
in compile_str
(status, compile_stderr.replace('\n', '. ')))
.

Process finished with exit code 1




Versions and main components

* Theano Version: 1.0.1+19.gf62fd39
* Python Version: 3.5.2
* Operating system: Windows 7 x64 Professional SP1

Results of 'C:\Downloads>pip show theano pandas numpy scipy'

Name: Theano
Version: 1.0.1+19.gf62fd39
Summary: Optimizing compiler for evaluating mathematical expressions on
CPUs and GPUs.
Home-page: http://deeplearning.net/software/theano/
Author: LISA laboratory, University of Montreal
Author-email: theano-***@googlegroups.com
License: BSD
Location: c:\anaconda3\lib\site-packages
Requires: numpy, scipy, six
---
Name: pandas
Version: 0.22.0
Summary: Powerful data structures for data analysis, time series,and
statistics
Home-page: http://pandas.pydata.org
Author: The PyData Development Team
Author-email: ***@googlegroups.com
License: BSD
Location: c:\anaconda3\lib\site-packages
Requires: python-dateutil, pytz, numpy
---
Name: numpy
Version: 1.14.0rc1+mkl
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: NumPy Developers
Author-email: numpy-***@python.org
License: BSD
Location: c:\anaconda3\lib\site-packages
Requires:
---
Name: scipy
Version: 1.0.0
Summary: SciPy: Scientific Library for Python
Home-page: https://www.scipy.org
Author: SciPy Developers
Author-email: scipy-***@python.org
License: BSD
Location: c:\anaconda3\lib\site-packages
Requires: numpy
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kamil Szynkarczuk
2018-01-09 10:07:42 UTC
Permalink
Was a dupe of https://github.com/Theano/Theano/issues/6532

I also blew up my anaconda env, which didn't help!
Post by Kamil Szynkarczuk
Hi all,
I'm having trouble getting started with Theano. Would someone be able to
help me with what I'm doing incorrectly?
Description of my problem
When I install and try to import theano, I get an error. I've tried
installing using conda, pip/pypi, and the bleeding edge installation using
pip/git. My numpy and scipy version may be too new as I'm using
1.14.0rc1+mkl and 1.0.0 respectively, but was unable to downgrade to the
required versions as scipy failed to compile as it requires numpy+mkl, and
a version as old as required by theano is no longer available here
https://www.lfd.uci.edu/~gohlke/pythonlibs/.
*Here is the code snippet that generates the error:*
`import theano`
*I installed the bleeding edge version using*
'C:\Downloads>pip install git+
https://github.com/Theano/Theano.git#egg=Theano'
Console output and traceback
C:\Anaconda3\python.exe
"C:/Users/kszynkarczuk_stm/PycharmProjects/Bayesian Inference
Example/Example.py"
File "C:\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line
75, in <module>
raise ImportError()
ImportError
File "C:\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line
92, in <module>
raise ImportError()
ImportError
File "C:/Users/kszynkarczuk_stm/PycharmProjects/Bayesian Inference
Example/Example.py", line 4, in <module>
import theano
C:\Users\KSZYNK~1\AppData\Local\Temp\theano_compilation_error_np4cnd31
File "C:\Anaconda3\lib\site-packages\theano\__init__.py", line 110, in
<module>
from theano.compile import (
File "C:\Anaconda3\lib\site-packages\theano\compile\__init__.py", line
12, in <module>
from theano.compile.mode import *
File "C:\Anaconda3\lib\site-packages\theano\compile\mode.py", line 11,
in <module>
import theano.gof.vm
File "C:\Anaconda3\lib\site-packages\theano\gof\vm.py", line 673, in
<module>
from . import lazylinker_c
File "C:\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line
127, in <module>
preargs=args)
File "C:\Anaconda3\lib\site-packages\theano\gof\cmodule.py", line 2359,
in compile_str
(status, compile_stderr.replace('\n', '. ')))
.
Process finished with exit code 1
Versions and main components
* Theano Version: 1.0.1+19.gf62fd39
* Python Version: 3.5.2
* Operating system: Windows 7 x64 Professional SP1
Results of 'C:\Downloads>pip show theano pandas numpy scipy'
Name: Theano
Version: 1.0.1+19.gf62fd39
Summary: Optimizing compiler for evaluating mathematical expressions on
CPUs and GPUs.
Home-page: http://deeplearning.net/software/theano/
Author: LISA laboratory, University of Montreal
License: BSD
Location: c:\anaconda3\lib\site-packages
Requires: numpy, scipy, six
---
Name: pandas
Version: 0.22.0
Summary: Powerful data structures for data analysis, time series,and
statistics
Home-page: http://pandas.pydata.org
Author: The PyData Development Team
License: BSD
Location: c:\anaconda3\lib\site-packages
Requires: python-dateutil, pytz, numpy
---
Name: numpy
Version: 1.14.0rc1+mkl
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: NumPy Developers
License: BSD
Location: c:\anaconda3\lib\site-packages
---
Name: scipy
Version: 1.0.0
Summary: SciPy: Scientific Library for Python
Home-page: https://www.scipy.org
Author: SciPy Developers
License: BSD
Location: c:\anaconda3\lib\site-packages
Requires: numpy
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...