随笔分类 -  Python

20230126 - TurboGears 提示 builtins.NameError Session is not defined
摘要:问题现象:TurboGears 常规操作,运行 gearbox 服务后报错: builtins.NameError 'Session' is not defined 解决办法:卸载最新版 SQLAlchemy 1.4 ,重新安装 SQLAlchemy 1.3。 重现步骤: 随便 quickstart 阅读全文

posted @ 2023-01-26 00:54 Eric Lee 阅读(71) 评论(0) 推荐(0)

20170319 - pycurl 提示 libcurl link-time version is older than compile-time version
摘要:使用 conda update anaconda 升级后,运行程序得到如下提示: ImportError: pycurl: libcurl link-time version (7.45.0) is older than compile-time version (7.52.1) 网上查解决办法,如 阅读全文

posted @ 2017-03-19 13:32 Eric Lee 阅读(2490) 评论(0) 推荐(0)

20170310 - Python 3 下 SQLAlchemy 的 MySQL 数据库 URI 配置
摘要:MySQL-Python 只用于 Python 2,URI配置为 mysql://username:password@server/db Python 3 下要使用另一个 PyMySQL 包,相应的URI改为 mysql+pymysql://username:password@server/db 使 阅读全文

posted @ 2017-03-10 02:11 Eric Lee 阅读(1324) 评论(0) 推荐(0)

20151023 - 用天枰3次从12个球中找1个不等重球的问题
摘要:问题:有12个球,其中于1个球与其他11个不等重,求通过天枰(无砝码)3次称出坏球。某种解法: 1、将12个球分为a、b、c三组: a: a1 a2 a3 a4b: b1 b2 b3 b4c: c1 c2 c3 c4 2、通过以下方法称(python伪代码) 阅读全文

posted @ 2015-10-23 17:05 Eric Lee 阅读(268) 评论(0) 推荐(0)

20081229 - 聊天机器人的简单实现
摘要:----把思路变为程序的过程是快乐的闭眼还能历历在目的一年半里,紧凑的工作节奏留给我一段值得反复回顾的记忆。还没来得及详细地对这过去的日子留下总结,生活就进入了下一站。有在站台侯车经历的人都应该理解,当心里迫切着,等待就成了煎熬。不如暂时放下期待,也不浪费时间,先做点什么吧!这就是做机器人初时的想法。如今已经坐上一趟新车,于是将这篇文章留给站台候车的十五天吧。在技术论坛闲逛,看到了一个C++在线编... 阅读全文

posted @ 2008-12-29 00:48 Eric Lee 阅读(803) 评论(0) 推荐(0)

20080823 - windows + apache + mod_python 的安装
摘要:django 需要 mod_python,网上可找到很多配置文章,整个过程没有什么可说的,仅有一点: 如果 python 不是 Install for all users 安装的,则启动 apache 时会提示: The Apache service named reported the following error: >>> httpd.exe: Syntax error on lin... 阅读全文

posted @ 2008-08-23 20:47 Eric Lee 阅读(578) 评论(0) 推荐(0)

导航