Installation on Ubuntu 20.04 - cannot find mysql-connector-python
See original GitHub issueI have tried this every possible way. Following the documented installation instructions, I ran:
pip install csvkit
pip install mysql-connector-python
csvsql -v mysql://user:password@host/db --insert file.csv
This results in the following, which seems to suggest that it’s failing to load or make use of SQLAlchemy. Any help would be greatly appreciated.
Traceback (most recent call last):
File "/home/brian/.local/bin/csvsql", line 8, in <module>
sys.exit(launch_new_instance())
File "/home/brian/.local/lib/python2.7/site-packages/csvkit/utilities/csvsql.py", line 221, in launch_new_instance
utility.run()
File "/home/brian/.local/lib/python2.7/site-packages/csvkit/cli.py", line 118, in run
self.main()
File "/home/brian/.local/lib/python2.7/site-packages/csvkit/utilities/csvsql.py", line 110, in main
raise ImportError('You don\'t appear to have the necessary database backend installed for connection string you\'re trying to use. Available backends include:\n\nPostgresql:\tpip install psycopg2\nMySQL:\t\tpip install mysql-connector-python\n\nFor details on connection strings and other backends, please see the SQLAlchemy documentation on dialects at: \n\nhttp://www.sqlalchemy.org/docs/dialects/\n\n')
ImportError: You don't appear to have the necessary database backend installed for connection string you're trying to use. Available backends include:
Postgresql: pip install psycopg2
MySQL: pip install mysql-connector-python
For details on connection strings and other backends, please see the SQLAlchemy documentation on dialects at:
http://www.sqlalchemy.org/docs/dialects/
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Install MySQL Connector Python on Windows, MAC, Linux, Unix
Go to download MySQL Connector python for Ubuntu from here. · Select the Operating system Ubuntu Linux from the drop-down. · Select the...
Read more >Installing Connector/Python with pip - MySQL :: Developer Zone
This is the recommended way to install Connector/Python. Make sure you have a recent pip version installed on your system. If your system ......
Read more >"pip install MySQL-python" not working on Ubuntu 20.04
When I try to install MySQL-python using pip for Python 2.7, it is not working anymore on Ubuntu 20.04 - on Ubuntu 18.04...
Read more >Install MySQL Connector Python On Ubuntu Linux and Verify ...
In this video we will learn to Install MySQL Connector / Python On Ubuntu Linux and Verify the Installation.
Read more >trying to install mysql-connector for python 3 - Ask Ubuntu
says to create the virtual environment, activate it and then proceed to pip install whatever package you need. however, when i get as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sido420 I dug through the SQLAlchemy documentation and read this warning for the mysql-connector-python: https://docs.sqlalchemy.org/en/14/dialects/mysql.html#module-sqlalchemy.dialects.mysql.mysqlconnector
So I switched to the mysqldb module homepage client and installed it like this on Ubuntu 20.04 with python 3:
Then I changed my connection string like this:
That made csvsql work. Hope that helps
“Hope that helps” > it helps perfect, the usage of pip3 is the point (not pip!!!)