Error Importing Mysqldb Module. This Is A Prerequisite
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring
Pip Install Mysql-python Mysql_config Not Found
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask install mysql python windows Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join
Install Mysqldb Python Mac
them; it only takes a minute: Sign up How to install Python MySQLdb module using pip? up vote 125 down vote favorite 34 How can I install the MySQLdb module for Python using pip? python mysql pip share|improve this mysqldb python download question asked Sep 16 '14 at 9:31 Marian 3,63031530 Linux or Windows? –Don Sep 16 '14 at 10:03 4 If you're looking to use this with Python3 (e.g., with the newest version of Django) you'll need mysqlclient as MysqlDB doesn't support python3. See This Question –Tyler Apr 25 at 19:31 add a comment| 7 Answers 7 active oldest votes up vote 186 down vote accepted It's easy to do, but hard to remember the correct spelling: failed building wheel for mysql-python pip install MySQL-python Note: Some dependencies might have to be in place when running the above command. Some hints on how to install these on various platforms: Ubuntu 14, Ubuntu 16, Debian 8.6 (jessie) sudo apt-get install python-pip python-dev libmysqlclient-dev Fedora 24: sudo dnf install python python-devel mysql-devel redhat-rpm-config gcc share|improve this answer edited Sep 26 at 15:52 answered Sep 16 '14 at 9:31 Marian 3,63031530 11 You don't have to remember the whole name, you can use pip search mysql and find the one you need in the output. –WKPlus Sep 16 '14 at 10:14 5 @WKPlus: right... but I did pip search mysqldb and didn't find it. Thus, I +1 this answer. –Dan H Dec 2 '14 at 19:59 2 @WKPlus actually it's pretty much a real hassle to find out the right choice after a pip search of mysql –kommradHomer May 30 '15 at 7:31 6 I have to google this every time, so damn infurating –sleepycal Jun 5 '15 at 20:10 2 @DavidOkwii When you're not inside a virtualenv, sudo is required. That might have been your problem. –Marian Aug 19 '15 at 9:10 | show 3 more comments up vote 110 down vote Starting from a fresh Ubuntu 14.04.2 system, these two commands were needed: apt-get install python-dev libmysqlclient-dev pip install MySQL-python Just doing the "pip install" by itself did not work. From http://codeinthehole.com/writing/how-to-set-up-mysql-for-pyth
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about
Import Mysqldb
Stack Overflow the company Business Learn more about hiring developers or posting ads with install mysqldb python ubuntu us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
Importerror: No Module Named 'configparser'
a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Python Programming with raspberry Pi…Import mysqldb error up vote -1 down vote favorite http://stackoverflow.com/questions/25865270/how-to-install-python-mysqldb-module-using-pip update Error Installation ErrorI am trying to access a database using python.when i am executing my script its giving error, Import Error:-No module named MySQL . I have even tried it to run with lower versions of python but the same error came.I tried to install the MySQL package using the command sudo apt-get install python-mysqldb but it throwing some error. python mysql share|improve this question edited Apr 7 at http://stackoverflow.com/questions/36473992/python-programming-with-raspberry-pi-import-mysqldb-error 11:30 asked Apr 7 at 10:51 gulshan raj 92 Add the error traceback –Padraic Cunningham Apr 7 at 10:56 Did you try install python-mysqldb? sudo apt-get install python-mysqldb –Adem Öztaş Apr 7 at 11:00 please post your some error –julivico Apr 7 at 11:02 @julivico I have added the image of the error in the post...please do see –gulshan raj Apr 7 at 11:10 @AdemÖztaş Yes, i have tried to install the mysqldb –gulshan raj Apr 7 at 11:11 | show 5 more comments 1 Answer 1 active oldest votes up vote 0 down vote So i write a answer, so that the question could be marked as "answered". The problem was losing internet connection. APT need internet connection to download the packages from source. For someone, who want to install python module MySQLDB in Debian or Ubuntu: apt-get update apt-get install python-mysqldb If you want to install MySQLDB from pip, you need to install all the prerequisites for python-mysqldb first (for virtualenv) apt-get build-dep python-mysqldb pip install mysql-python share|improve this answer edited Apr 8 at 8:43 answered Apr 8 at 8:36 julivico 1,256114 add a comment| Your Answer draft saved draft discarded Sign up or
Sign in Pricing Blog Support Search GitHub This repository Watch 206 Star 356 Fork 682 puppetlabs/puppetlabs-mysql Code Pull requests 8 Projects 0 Pulse Graphs MySQL Puppet Module / Manifests + https://github.com/puppetlabs/puppetlabs-mysql Types & Providers 1,335 commits 17 branches 33 releases 203 contributors Apache-2.0 Ruby 73.4% http://codeinthehole.com/writing/how-to-set-up-mysql-for-python-on-ubuntu/ Puppet 24.2% HTML 2.4% Ruby Puppet HTML Clone or download Clone with HTTPS Use Git or checkout with SVN using the web URL. Open in Desktop Download ZIP Find file Branch: master Switch branches/tags Branches Tags 0.x 1.x 2.2.x 2.3.x 3.0.x 3.1.x 3.2.x 3.3.x 3.4.x 3.5.x 3.6.x 3.7.x 3.8.x copy-paste-error master modulesync release install mysql Nothing to show v0.0.1 3.9.0 3.8.0 3.7.0 3.6.2 3.6.1 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.3.1 2.3.0 2.2.3 2.2.2 2.2.1 2.2.0 2.1.0 2.0.1-rc1 2.0.0-rc1 1.0.0 0.9.0 0.8.1 0.8.0 0.7.0 0.6.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 Nothing to show New pull request Latest commit 81c4fed Sep 30, 2016 bmjen committed on GitHub Merge pull request #895 from puppetlabs/revert-888-master … Revert "Add support for REQUIRE SSL|X509 install mysqldb python option" Permalink Failed to load latest commit information. examples Fix lint warnings and ensure lint fails on warnings Feb 12, 2015 lib Revert "Add support for REQUIRE SSL|X509 option" Sep 30, 2016 manifests Merge pull request #891 from jkroepke/3879-import_cat_cmd Sep 29, 2016 spec Revert "Add support for REQUIRE SSL|X509 option" Sep 30, 2016 templates Merge pull request #856 from cfasnacht/ticket/6404-new_maxallowedpack… Jun 22, 2016 .fixtures.yml (maint) Switches nanliu-staging dependency to puppet-staging May 25, 2016 .geppetto-rc.json Update for using Geppetto plugin in CI Dec 2, 2014 .gitattributes (FM-4046) Update to current msync configs [006831f] Feb 16, 2016 .gitignore (MAINT) Update for modulesync_config 72d19f184 Jul 27, 2016 .nodeset.yml Add rspec-system / serverspec tests Jul 5, 2013 .rspec (FM-4049) Update to current msync configs [2c99161] Jan 27, 2016 .rubocop.yml Update modulesync_config [a3fe424] Aug 26, 2016 .sync.yml (FM-4049) Update to current msync configs [2c99161] Jan 27, 2016 .travis.yml Update modulesync_config [a3fe424] Aug 26, 2016 CHANGELOG.md Release prep for 3.9.0 Sep 6, 2016 CONTRIBUTING.md {maint} modulesync 0794b2c Jun 30, 2016 Gemfile Update modulesync_config [a3fe424] Aug 26, 2016 LICENSE (FM-4046) Update to current msync configs [006831f] Feb 16, 2016 NOTICE (FM-4046) Update to current msync configs [006831f] Feb 16, 2016 README.md Revert "Add support for
a pinch of salt. This is just for my own reference as I always forget the dependencies for setting up MySQL on a new machine. Installation Starting with a vanilla Lucid install [1], install pip and upgrade to the latest version: apt-get install python-pip pip install -U pip Next, install the required development packages: apt-get install python-dev libmysqlclient-dev then pip install MySQL-python should complete successfully. [1]Tested using the Lucid32 Vagrant box: http://files.vagrantup.com/lucid32.box Symptoms of missing headers Without libmysqlclient-dev, you'll see something like this: Downloading/unpacking MySQL-python Running setup.py egg_info for package MySQL-python sh: mysql_config: not found Traceback (most recent call last): File "