Facing below error "ModuleNotFoundError: No module named 'pymysql'"
import os
import pymysql
import pandas as pd
host = os.getenv('MYSQL_HOST')
port = os.getenv('MYSQL_PORT')
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_PASSWORD')
database = os.getenv('MYSQL_DATABASE')
Need assistance as I am new to this.
This issue got fixed. I installed pymysql and mysql-connector using anaconda prompt.
make sure it's installed.
run this in terminal/cmd:
windows
$ python3 -m pip install PyMySQL
or simply:
pip install PyMySQL
linux
$ sudo apt-get install python3-pymysql
I fixed this on my pc too it took me 1 day :) So go to your cmd or terminal and write : pip uninstall pymysql
python -m pip --upgrade pip pip install pymysql
This will fix it as the version of pip u are using cant build a wheel for the module
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.