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 explanation of Nginx log customization and enabling log buffer

Preface If you want to count the source of websit...

How to connect to virtual machine MySQL using VScode in window environment

1. Virtual Machine Side 1. Find the mysql configu...

Detailed explanation of application scenarios of filters in Vue

filter is generally used to filter certain values...

Implementation of vue3.0+vant3.0 rapid project construction

Table of contents 1. Project Construction 2. Vue3...

Detailed explanation of how to gracefully delete a large table in MySQL

Preface To delete a table, the command that comes...

Methods and steps to build nginx file server based on docker

1. Create a new configuration file docker_nginx.c...

Detailed tutorial on installing Anaconda3 on Ubuntu 18.04

Anaconda refers to an open source Python distribu...

Detailed explanation of Vue development website SEO optimization method

Because the data binding mechanism of Vue and oth...

Vue calls the computer camera to realize the photo function

This article example shares the specific code of ...

Implementation of Docker packaging image and configuration modification

I have encountered many problems in learning Dock...

A simple example of using Vue3 routing VueRouter4

routing vue-router4 keeps most of the API unchang...

Sample code for implementing form validation with pure CSS

In our daily business, form validation is a very ...