Solution:
Modify the setup.py file directly in the directory where you downloaded the pythearn2 package:
Change from theano.compat.six.moves import input to from six.moves import input
Then you can:
python setup.py build
python setup.py install
ps: Install theano in Ubuntu environment
Recently, due to the special need to install theano, there are actually several alternative ways to install theano on ubuntu. The easiest way is to directly pip install theano, and then pip install which package is missing, but after I install it, run the code There was a problem:
ImportError: cannot import name ‘downsample'
I checked the information and found that the latest version does not have this. This is mainly an error caused by Theano version update. The solution is
pip install theano==0.8.2
Use this to change back to an older version.
to sum up
The above is what the editor introduced to you to solve the problem of "No module named'theano.compat.six'" when installing Theano on Ubuntu19. I hope it will help you!