ModuleNotFoundError: No module named 'pymysql' 但我已经安装了 pymydql。我的操作系统是Windows,并且只有一个版本 python。 这两种安装方式都已经试过: pip install PyMySQL pip3 install PyMySQL 并且在 cmd 页面中 import pymysql 没有任何报错。 在 Python 自带的 IDLE 中也可以正常运行。 这个是怎么回事? pymysql不支援python 3.8,與PyCharm無關,建議降回3.7.3或等pymysql出新的版本 https://github.com/PyMySQL/mysqlclient-python/issues/402 https://pypi.org/project/PyMySQL/ https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html# PyCharm 要設定 site-packages . https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000058690-Module-not-found-in-PyCharm-but-externally-in-Python it has been installed ![https://ithelp.ithome.com.tw/upload/images/20200610/20099494YzCx99HMu0.png](https://ithelp.ithome.com.tw/upload/images/20200610/20099494YzCx99HMu0.png)
但我已经安装了 pymydql。我的操作系统是Windows,并且只有一个版本 python。
这两种安装方式都已经试过:
pip install PyMySQL pip3 install PyMySQL 并且在 cmd 页面中 import pymysql 没有任何报错。 在 Python 自带的 IDLE 中也可以正常运行。 这个是怎么回事? pymysql不支援python 3.8,與PyCharm無關,建議降回3.7.3或等pymysql出新的版本 https://github.com/PyMySQL/mysqlclient-python/issues/402 https://pypi.org/project/PyMySQL/ https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html# PyCharm 要設定 site-packages . https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000058690-Module-not-found-in-PyCharm-but-externally-in-Python it has been installed ![https://ithelp.ithome.com.tw/upload/images/20200610/20099494YzCx99HMu0.png](https://ithelp.ithome.com.tw/upload/images/20200610/20099494YzCx99HMu0.png)
并且在 cmd 页面中 import pymysql 没有任何报错。 在 Python 自带的 IDLE 中也可以正常运行。
这个是怎么回事?
pymysql不支援python 3.8,與PyCharm無關,建議降回3.7.3或等pymysql出新的版本
https://github.com/PyMySQL/mysqlclient-python/issues/402
https://pypi.org/project/PyMySQL/
https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html#
PyCharm 要設定 site-packages .
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000058690-Module-not-found-in-PyCharm-but-externally-in-Python