
Python问题解决
一个Tester
一个晚上不睡觉的Tester
展开
-
python3安装mysqlclient报错This error originates from a subprocess, and is likely not a problem with pip.
记得在项目下 __init__.py添加以下代码(项目下,非应用下)安装:pymysql。原创 2024-01-09 18:10:00 · 675 阅读 · 0 评论 -
Flask-Login 使用current_user.is_authenticated()报错:TypeError: ‘bool‘ object is not callable
Flask-Login 使用current_user.is_authenticated()报错:TypeError: 'bool' object is not callable原创 2022-02-25 15:29:17 · 1122 阅读 · 0 评论 -
解决Python连接Mysql问题:NameError: name ‘_mysql‘ is not defined
原因是:Mysqldb 不兼容 python3.5 以后的版本解决办法:使用pymysql代替MySQLdb在.py文件开头添加一下代码import pymysqlpymysql.version_info = (1, 4, 13, "final", 0)pymysql.install_as_MySQLdb()原创 2022-02-07 14:41:43 · 3697 阅读 · 1 评论 -
解决Python命令行执行import导入自己创建的包错误
解决Python命令行执行import导入自己创建的包错误执行一下命令打开文件vi ~/.bash_profile添加(双引号内为项目跟路径)并保存export PYTHONPATH="/Users/kongjingchun/code/AutoTest~~~~执行source ~/.bash_profile重新运行程序即可...原创 2021-09-15 00:46:35 · 1197 阅读 · 0 评论