Solve the problem of installing Theano on Ubuntu 19

Solve the problem of installing Theano on Ubuntu 19

Solution:

Directly in the directory where you downloaded the pythearn2 package, modify the setup.py file:
Changed 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, I need to install Theano. There are several ways to install Theano in Ubuntu. The simplest one is to pip install Theano directly, and then pip install any package that is missing. However, after I installed it, a problem occurred when I ran the code:

ImportError: cannot import name 'downsample'

After checking the information, I found that the latest version no longer has this feature. This is mainly an error caused by the Theano version update. The solution is

pip install theano==0.8.2

This can be used to change back to an older version.

Summarize

The above is the editor’s introduction to solving the problem of "No module named 'theano.compat.six'" when installing Theano in Ubuntu 19. I hope it will be helpful to everyone!

You may also be interested in:
  • Share the problem of Ubuntu 19 not being able to install docker source
  • Tutorial on installing Android Studio on Ubuntu 19 and below
  • VMware12 installs Ubuntu19.04 desktop version (installation tutorial)
  • Ubuntu 19.04 installation tutorial (picture and text steps)

<<:  Why should the number of rows in a single MySQL table not exceed 5 million?

>>:  Two implementation solutions for vuex data persistence

Recommend

Detailed discussion of memory and variable storage in JS

Table of contents Preface JS Magic Number Storing...

Summary of bootstrap learning experience-css style design sharing

Due to the needs of the project, I plan to study ...

MySQL table name case selection

Table of contents 1. Parameters that determine ca...

Use CSS variables to achieve cool and amazing floating effects

Recently, I found a fun hover animation from the ...

MYSQL uses Union to merge the data of two tables and display them

Using the UNION Operator union : Used to connect ...

CSS tips for controlling animation playback and pause (very practical)

Today I will introduce a very simple trick to con...

uniapp dynamic modification of element node style detailed explanation

Table of contents 1. Modify by binding the style ...

How to install mysql5.7.24 binary version on Centos 7 and how to solve it

MySQL binary installation method Download mysql h...

A brief discussion on the use of Web Storage API

Table of contents 1. Browser local storage techno...

IE6 web page creation reference IE6 default style

This is not actually an official document of IE. I...