Score:1

Install python-mysqldb for Python 2.7 in Ubuntu 20.04 - unmet dependencies

in flag
Run

I am trying to install python-mysqldb for Python 2.7 in Ubuntu 20.04:

$ sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main'
$ sudo apt update
$ sudo apt install -y python-mysqldb

I get the following error:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-mysqldb : Depends: python (< 2.8)
                  Depends: python (>= 2.7~)
                  Depends: python:any (< 2.8)
                  Depends: python:any (>= 2.7.5-5~)
E: Unable to correct problems, you have held broken packages.

Any idea how I can fix it?

I have Python 2.7.18 and Python 3 installed in my Ubuntu 20.04

Score:1
zw flag

You have to undo repository addition by

sudo add-apt-repository -r 'deb http://archive.ubuntu.com/ubuntu bionic main'

and then download two packages from 18.04 LTS repository and install them by using commands below:

sudo apt-get update

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/main/p/python-mysqldb/python-mysqldb_1.3.10-1build1_amd64.deb
wget -c http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/libmysqlclient20_5.7.36-0ubuntu0.18.04.1_amd64.deb
sudo apt-get install ./python-mysqldb_1.3.10-1build1_amd64.deb  ./libmysqlclient20_5.7.36-0ubuntu0.18.04.1_amd64.deb
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.