Python-mysqldb debian install




















Also once done with yum installation I was able to install via pip without any errors. It helped me to install this pip install pymysql and then use the following command in the python file import pymysql as MySQLdb This way you can use MySQLdb without any problems. DovaX DovaX 9 9 silver badges 12 12 bronze badges. If you are unable to install mysqlclient you can also install pymysql : pip install pymysql This works same as MySqldb. After that use pymysql all over instead of MySQLdb. Aniket Babhulkar Aniket Babhulkar 63 1 1 silver badge 7 7 bronze badges.

This should be the answer. If you are use Raspberry Pi [Raspbian OS] There are need to be install pip command at first apt-get install python-pip So that just install Sequently apt-get install python-dev libmysqlclient-dev apt-get install python-pip pip install MySQL-python. Tanakorn Lueangkajonvit Tanakorn Lueangkajonvit 53 8 8 bronze badges.

Community Bot 1 1 1 silver badge. If you have Windows installed on your system then type the following command on cmd : pip install mysql-connector if the above command does not work try using: pip install mysql-connector-python Now,if the above commands do not get the work done, try using: pip install mysql-connector-python-rf That's it you are good to go now. The above answer is great, but there may be some problems when we using pip to install MySQL-python in Windows for example,It needs some files that are associated with Visual Stdio.

Another way is the answer of bob I am here to do something to add. Vast Vast 81 1 1 silver badge 4 4 bronze badges. Frank Harb Frank Harb 79 12 12 bronze badges. If pip3 isn't working, you can try: sudo apt install python3-mysqldb. Frank T 6, 6 6 gold badges 44 44 silver badges 64 64 bronze badges.

Marc Gottlieb Marc Gottlieb 11 2 2 bronze badges. Not very good answer. Please wait until the author adds more details. Matthew Park Matthew Park 1, 1 1 gold badge 12 12 silver badges 16 16 bronze badges.

Done Building dependency tree Reading state information Done The following additional packages will be installed: libmariadbclient18 mysql-common Suggested packages: default-mysql-server virtual-mysql-server python-egenix-mxdatetime python-mysqldb-dbg The following NEW packages will be installed: libmariadbclient18 mysql-common python-mysqldb 0 upgraded, 3 newly installed, 0 to remove and 29 not upgraded.

Need to get kB of archives. After this operation, kB of additional disk space will be used. Do you want to continue? Reading database Preparing to unpack Unpacking mysql-common 5. Selecting previously unselected package libmariadbclientamd Unpacking libmariadbclientamd64 Selecting previously unselected package python-mysqldb. Unpacking python-mysqldb 1. Setting up mysql-common 5. Podcast Making Agile work for data science.

Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Visit chat. Linked See more linked questions. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.

Accept all cookies Customize settings. Is that mean that database on my host is running? You should've just search for your error message: 1 , 2 , 3 - it is not related to Docker or the way you use it. It's just that the db isn't started by default in Docker like it is in Ubuntu normally. Add a comment. Active Oldest Votes. To see what I mean, create the following script, and call it cmd.

To do this: Take the mysql installation stuff out of the Dockerfile Change localhost in your python code to mysql or whatever you want to call your MySQL container. Start a MySQL container with something like docker run -d --name mysql mysql Start your container and link to the mysql container e.

Improve this answer. Adrian Mouat Adrian Mouat I got the same error. If I separate this in two containers, what should be in the first and what should be in second container. Did I must to linked them? Added some instructions. Yes, links make things easier. I really can't help you any more. Let us know if this guide made it easy to get the answer you needed. Explore docs. Docs Home Guides Development Python. Docs Home List Sections Tiles. No Results. Add tags. This guide was written for Debian Other distributions are available:.

Debian Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso. This credit will be applied to any valid services used during your first 60 days. Sign Up. Before You Begin This guide assumes that you have access to a server or workstation running Debian



0コメント

  • 1000 / 1000