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 reverse proxy webSocket configuration

Recently, I used the webSocket protocol when work...

Method of building docker private warehouse based on Harbor

Table of contents 1. Introduction to Harbor 1. Ha...

Summary of Linux Logical Volume Management (LVM) usage

Managing disk space is an important daily task fo...

Several ways to solve the 1px border problem on mobile devices (5 methods)

This article introduces 5 ways to solve the 1px b...

MySQL 8.0.22 installation and configuration method graphic tutorial

This article records the installation and configu...

7 interesting ways to achieve hidden elements in CSS

Preface The similarities and differences between ...

How to install Nginx and configure multiple domain names

Nginx Installation CentOS 6.x yum does not have n...

Add a floating prompt for the header icon in the ElementUI table

This article mainly introduces how to add floatin...

Real-time refresh of long connection on Vue+WebSocket page

Recently, the Vue project needs to refresh the da...

CSS3 uses animation attributes to achieve cool effects (recommended)

animation-name animation name, can have multiple ...

How to connect to MySQL remotely through Navicat

Using Navicat directly to connect via IP will rep...