raise
PACKAGE_NAME= “aipyapp” 像C宏定义
sys.executable 当前python路径
sys.stdout = open(os.devnull, “w”, encoding=‘utf-8’) 标准输出 stdout 重定向到“黑洞”
with as 获取资源,使用资源,自动释放资源
toml文件,比 JSON 更适合人手写的配置文件。
name = "chenhao" age = debug = true[database]host="localhost"port=3306[database.mysql]user="root"password="123456"pyproject.toml开始
这个项目叫什么?
↓
什么版本?
↓
需要什么 Python?
↓
依赖哪些库?
↓
怎么构建?
↓
使用什么工具?
↓
测试/格式化/检查工具怎么配置?
如何运行项目
pip install aipyapp
aipy
报错
RequiredDependencyException:
The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source. Please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation/basic-installation.html <string>:50: RuntimeWarning: Pillow 10.4.0 does not support Python 3.14 and does not provide prebuilt Windows binaries. We do not recommend building from source on Windows. [end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pillow
Failed to build pillow
error: failed-wheel-build-for-install
× Failed to build installable wheels for some pyproject.toml based projects
╰─> pillow
不支持3.14?,不推荐用windows?
推荐用python 3.12。我改为3.13后正常。当然是ai自动处理的。
deepseek API
C:\Users\FT.aipyapp\aipyapp.toml
[llm.deepseek]
type = “deepseek”
model = “deepseek-flash”
api_key = “sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
enable = true
default = false