MishaVacic
MishaVacic

Reputation: 1887

Python 3 and mysqlclient with conda

I want to install mysqlclient(Python was installed with conda).I got this

conda install mysqlclient
Fetching package metadata .........
Solving package specifications: .


PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels: 
  - mysqlclient

Close matches found; did you mean one of these?

    mysqlclient: mwclient, slackclient, pysmbclient

I am on Ubuntu 16.04,64 bit.

This is with apt search
apt search mysqlclient
Sorting... Done
Full Text Search... Done


libmysqlclient-dev/xenial-updates,xenial-security,now 5.7.18-0ubuntu0.16.04.1 amd64 [installed]
  MySQL database development files

libmysqlclient20/xenial-updates,xenial-security,now 5.7.18-0ubuntu0.16.04.1 amd64 [installed,automatic]
  MySQL database client library

python-mysqldb/xenial,now 1.3.7-1build2 amd64 [installed]
  Python interface to MySQL

python-mysqldb-dbg/xenial 1.3.7-1build2 amd64
  Python interface to MySQL (debug extension)

python3-mysqldb/xenial 1.3.7-1build2 amd64
  Python interface to MySQL

python3-mysqldb-dbg/xenial 1.3.7-1build2 amd64
  Python interface to MySQL (debug extension)

But I am still confused,I can not run mysqlclient from python.

  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mysqldb'

Upvotes: 2

Views: 4303

Answers (1)

phd
phd

Reputation: 94726

The module name for import is MySQLdb, not mysqldb. Python is case-sensitive language even on case-insensitive filesystems.

Upvotes: 1

Related Questions