If you’re having issues compiling the binary extension, or on a platform where you cant, you can try using the pure python PyMySQL
bindings.
Simply pip install pymysql
and switch your SQLAlchemy URI to start like this:
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://.....'
There are some other drivers you could also try.
Related Posts:
- ModuleNotFoundError: No module named ‘MySQLdb’
- IndexError: tuple index out of range —– Python
- Redirecting to URL in Flask
- json.dumps vs flask.jsonify
- Internal Redirect in Flask
- Get the data received in a Flask request
- Get the data received in a Flask request
- ImportError: cannot import name
- Install mysql-python (Windows)
- Where can I find a list of the Flask SQLAlchemy Column types and options?
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock
- Flask Template Not found
- Return JSON response from Flask view
- Flask ImportError: No Module Named Flask
- Python: tuple indices must be integers, not str when selecting from mysql table
- Flask ImportError: No Module Named Flask
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock
- Setting Django up to use MySQL
- mysql_config not found when installing mysqldb python interface
- Flask ImportError: No Module Named Flask
- ImportError: No Module Named bs4 (BeautifulSoup)
- SQLAlchemy ORDER BY DESCENDING?
- How to update SQLAlchemy row entry?
- Flask raises TemplateNotFound error even though template file exists
- Flask example with POST
- Where do I get a SECRET_KEY for Flask?
- How can I get the named parameters from a URL using Flask?
- Flask Error: “Method Not Allowed The method is not allowed for the requested URL”
- In Flask, what is “request.args” and how is it used?
- In Flask, what is “request.args” and how is it used?
- How does ajax work with python?
- ImportError: No module named mysql.connector using Python2
- ImportError: No module named ‘MySQL’
- Flask-SQLalchemy update a row’s information
- Replacing Pandas or Numpy Nan with a None to use with MysqlDB
- Trying to run Flask app gives “Address already in use”
- What is the easiest way to clear a database from the CLI with manage.py in Django?
- jinja2.exceptions.TemplateNotFound error [duplicate]
- How to serve static files in Flask
- Installing MySQL-python causes command ‘clang’ failed with exit status 1 on Mac OS 10.13.15
- python flask import error
- How do I get Flask to run on port 80?
- Error loading MySQLdb module: No module named ‘MySQLdb’
- Python MySQLdb not importing
- python-How to set global variables in Flask?
- How to get POSTed JSON in Flask?
- How to create a new database using SQLAlchemy?
- Flask Value error view function did not return a response [duplicate]
- Flask-framework: MVC pattern
- Create dynamic URLs in Flask with url_for()
- File “/usr/bin/pip”, line 9, in
from pip import main ImportError: cannot import name main - numpy max vs amax vs maximum
- TypeError: ‘str’ object is not callable (Python)
- ValueError: invalid literal for int() with base 10: ”
- Print string to text file
- Why is it string.join(list) instead of list.join(string)?
- Importing class from another file [duplicate]
- Pandas group-by and sum
- Python List vs. Array – when to use?
- How to terminate a script?
- numpy array concatenate: “ValueError: all the input arrays must have same number of dimensions”
- csv.Error: iterator should return strings, not bytes
- SyntaxError: non-default argument follows default argument
- How can I flush the output of the print function?
- Python calling method in class
- No module named pkg_resources
- Opening a .ipynb.txt File
- How do I remove all packages installed by PIP?
- ValueError: need more than 1 value to unpack python
- What is the best way to exit a function (which has no return value) in python before the function ends (e.g. a check fails)?
- Replace and overwrite instead of appending
- module ‘pandas’ has no attribute ‘rolling_mean’
- pip install mysql-python fails with EnvironmentError: mysql_config not found
- Displaying better error message than “No JSON object could be decoded”
- Loading a file with more than one line of JSON into Pandas
- SystemError: new style getargs format but argument is not a tuple?
- How to convert bytearray to string in python
- Subtracting two lists in Python
- Is there any way to kill a Thread?
- BeautifulSoup getting href
- Python NameError, variable ‘not defined’
- Cannot import cv2 in python in OSX
- numpy-equivalent of list.pop?
- How to get row number in dataframe in Pandas?
- Difference between Python’s Generators and Iterators
- “Unorderable types: int() < str()"
- python : an integer is required (got type str)
- Django Rest Framework — no module named rest_framework
- Disable / Enable Button in TKinter
- Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
- How do I find the time difference between two datetime objects in python?
- How to strip a specific word from a string?
- Printing subscript in python
- Get difference between two lists
- how to build .exe for python 3.5+, 3.6 if possible?
- How to query as GROUP BY in django?
- Python regex match space only
- OpenCV houghLinesP parameters
- How do I restart a program based on user input?
- Python Pandas : pivot table with aggfunc = count unique distinct