首先安装虚拟环境
python3 -m venv myenv
激活虚拟环境
source myenv/bin/activate
报错如下
raceback (most recent call last):File "test.py", line 1, in <module>import mysql.connector
ModuleNotFoundError: No module named 'mysql'
解决方法:
python mysql-connector-python