MySQLdb is only for Python 2.x. You can’t install in Python 3.x versions. Now from your question i can see that you are working with Django. In this case you have three alternatives, from Django mysql notes:
- mysqldb
- mysqlclient
- mysql-connect-python
This gives to you two alternatives, mysqlclient and mysql-connect-python, The first one requires compilation from extensions for the plugin and, in Windows, this implies VStudio Libraries and a know-how for compile native extensions.
mysql-connect-python is not compiled (and i don’t recommend this for production, maybe only for dev) so you are going to need to install this.
You can try:
pip3 install mysql-connect-python
or
pip3 install http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip
if the first one fails.
Related Posts:
- Can’t fix “zipimport.ZipImportError: can’t decompress data; zlib not available” when I type in “python3.6 get-pip.py”
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock
- Setting Django up to use MySQL
- Django Rest Framework — no module named rest_framework
- TypeError: int() argument must be a string, a bytes-like object or a number, not ‘list’
- ImportError: No module named ‘django.core.urlresolvers’
- What is the easiest way to clear a database from the CLI with manage.py in Django?
- Use Gif Logo For Loading Screen In Kivy
- How can I make a time delay in Python? [duplicate]
- Python – TypeError: ‘int’ object is not iterable
- What is the difference between rw+ and r+
- Python – TypeError: ‘int’ object is not iterable
- Python: ‘ModuleNotFoundError’ when trying to import module from imported package
- What does the list() function do in Python?
- Invalid character in identifier
- Convert bytes to a string
- Python Error: AttributeError: __enter__ [duplicate]
- filedialog, tkinter and opening files
- Getting TypeError: __init__() missing 1 required positional argument: ‘on_delete’ when trying to add parent table after child table with entries
- Error in Python script “Expected 2D array, got 1D array instead:”?
- ‘str’ object has no attribute ‘decode’. Python 3 error?
- How to find all the indexes of a recurring item in a list?
- Name ‘xrange’ is not defined in Python 3 [duplicate]
- How to check Django version
- How do you use subprocess.check_output() in Python?
- Error: ” ‘dict’ object has no attribute ‘iteritems’ “
- (Help) TypeError: ‘str’ object cannot be interpreted as an integer
- How do order of operations go on Python?
- Why KeyError: 0
- How to upgrade pip3?
- Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
- TypeError: cannot convert the series to
- Pinging servers in Python
- Import error: No module name urllib2
- ‘End of statement expected’ in pycharm
- Change figure size and figure format in matplotlib
- How can I concatenate str and int objects?
- error: Failed to load the native TensorFlow runtime
- ImportError: No module named ‘encodings’
- TypeError(“‘bool’ object is not iterable”,) when trying to return a Boolean
- Get ZeroDivisionError: float division in python
- Python: tuple indices must be integers, not str when selecting from mysql table
- PermissionError: [WinError 5] Access is denied
- How to delete last item in list?
- Don’t understand this SyntaxError: illegal target for annotation
- Using Queue in python
- Converting int to bytes in Python 3
- How to get the current working directory using python 3?
- min() arg is an empty sequence
- “for line in…” results in UnicodeDecodeError: ‘utf-8’ codec can’t decode byte
- SyntaxError invalid token
- How do I format a string using a dictionary in python-3.x?
- For loop and ‘numpy.float64’ object is not iterable error
- django MultiValueDictKeyError error, how do I deal with it
- ImportError: No module named MySQLdb
- python mpl_toolkits installation issue
- Python sockets error TypeError: a bytes-like object is required, not ‘str’ with send function
- Pipenv: Command Not Found
- TypeError: ‘dict_keys’ object does not support indexing
- How to strip all whitespace from string
- Python Binomial Coefficient
- Pip – Fatal error in launcher: Unable to create process using ‘”‘
- pythonw.exe or python.exe?
- NumPy array is not JSON serializable
- pip install -r requirements.txt [Errno 2] No such file or directory: ‘requirements.txt’
- How to convert ‘binary string’ to normal string in Python3?
- Properly formatted multiplication table
- python3 TypeError: ‘function’ object is not iterable
- How to start from second index for for-loop
- How to compare individual characters in two strings in Python 3
- ModuleNotFoundError: No module named ‘seaborn’ in Python IDE
- Is there a ceiling equivalent of // operator in Python?
- Need to install urllib2 for Python 3.5.1
- Django reverse lookup of foreign keys
- ImportError: No module named ‘xlrd’
- Moving Average Pandas
- TypeError: ‘set’ object does not support indexing
- How to fix error “ERROR: Command errored out with exit status 1: python.” when trying to install django-heroku using pip
- Root mean square of a function in python
- H14 error in heroku – “no web processes running”
- What does this Django regular expression mean? `?P`
- Is it better to use path() or url() in urls.py for django 2.0?
- matplotlib: plot multiple columns of pandas data frame on the bar chart
- pip throws TypeError: parse() got an unexpected keyword argument ‘transport_encoding’ when trying to install new packages
- No module named django but it is installed
- What is the purpose of dollar sign in this Python3 string formatting expression?
- How to know/change current directory in Python shell?
- What does on_delete do on Django models?
- What is an easy way to implement fprintf in python?
- How to check if a user is logged in (how to properly use user.is_authenticated)?
- The view didn’t return an HttpResponse object. It returned None instead
- gunicorn.errors.HaltServer:
django - Generator expression must be parenthesized if not sole argument
- Does python have header files like C/C++?
- How to install NumPy for Python 3.6
- TypeError: got multiple values for argument
- IOError: [Errno 32] Broken pipe when piping: `prog.py | othercmd`
- Python webbrowser.open() to open Chrome browser
- __init__() got an unexpected keyword argument ‘user’