when I update Theano and Keras , I got this error as follow. How can I should do? thanks a lot.
Using Theano backend.
Traceback (most recent call last):
File "lstm_loc.py", line 4, in
from keras.models import Sequential
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 15, in
from . import backend as K
File "/usr/local/lib/python2.7/dist-packages/keras/backend/init.py", line 46, in
from .theano_backend import *
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 4, in
from theano.tensor.signal import pool
ImportError: cannot import name pool
You should update Theano to the master branch from the Github repo.
Instructions can be found in the Readme.md of the Keras repo.
On Mar 3, 2016 16:45, "talentlei" [email protected] wrote:
when I update Theano and Keras , I got this error as follow. How can I
should do? thanks a lot.Using Theano backend.
Traceback (most recent call last):
File "lstm_loc.py", line 4, in
from keras.models import Sequential
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 15, in
from . import backend as K
File "/usr/local/lib/python2.7/dist-packages/keras/backend/init.py", line
46, in
from .theano_backend import *
File
"/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py",
line 4, in
from theano.tensor.signal import pool
ImportError: cannot import name pool—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/1888.
I could run the keras normally before I update the Theano and keras.
sudo pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
@fchollet
I update using
sudo pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
I still meet the same question. How can I solve this problem.
this is the information when I update the Theano:
~/Code/graduate/graduate/NER_LSTM$ sudo pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
Downloading/unpacking git+git://github.com/Theano/Theano.git
Cloning git://github.com/Theano/Theano.git to /tmp/pip-UQ8Y2T-build
Running setup.py (path:/tmp/pip-UQ8Y2T-build/setup.py) egg_info for package from git+git://github.com/Theano/Theano.git
warning: manifest_maker: MANIFEST.in, line 9: 'recursive-include' expects
Installing collected packages: Theano
Found existing installation: Theano 0.7.0
Can't uninstall 'Theano'. No files were found to uninstall.
Running setup.py install for Theano
changing mode of build/scripts-2.7/theano-cache from 644 to 755
changing mode of build/scripts-2.7/theano-nose from 644 to 755
changing mode of build/scripts-2.7/theano-test from 644 to 755
warning: manifest_maker: MANIFEST.in, line 9: 'recursive-include' expects <dir> <pattern1> <pattern2> ...
changing mode of /usr/local/bin/theano-nose to 755
changing mode of /usr/local/bin/theano-test to 755
changing mode of /usr/local/bin/theano-cache to 755
Successfully installed Theano
Cleaning up...
As you can verify for yourself, there _is_ a "pool" module in the latest Theano version. You are simply running an old Theano version, because your fresh install is _not_ the same install of Theano that you are importing when you run Python code. You're apparently importing it from somewhere else. Check your Python path.
Just reinstall Theano from scratch and your problem will be solved.
Worked for me when i switched to python 2.
check out your filename is multiprocessing.py,from multiprocessing import Pool will import your multiprocessing.py,so can not import name Pool.:)
Most helpful comment
sudo pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps