Iris是Go语言高性能Web框架,以速度最快著称,支持MVC、中间件、WebSocket等特性;安装需go get github.com/kataras/iris/v12@latest并配置GO111MODULE=on和GOPROXY。

装 Iris 框架本身不难,难的是你根本不知道自己在装哪个 Iris——Go 的 iris、Mediapipe 的 iris、InterSystems 的 IRIS,还是医学影像的 Iris。先确认你真正要的是哪一个,否则 pip install 或 go get 之后跑不起来,全是版本和路径的锅。
go get iris 报错 fatal: early EOF?检查 GOPROXY 和 Go 模块开关
这是 Go 生态在国内最典型的卡点:GitHub 直连超时导致 go get 中断,报错里带 early EOF、RPC failed 或 exit status 128。它和 Iris 框架本身无关,纯属网络策略问题。
- 必须开启 Go Modules:
GO111MODULE=on - 必须设置国内代理:
GOPROXY=https://goproxy.io(或https://goproxy.cn) - Windows 用户注意:PowerShell 用
$env:GO111MODULE="on",CMD 用set GO111MODULE=on,别混用 - Go 版本建议 ≥ 1.19;低于 1.13 的需额外配
GOSUMDB=off防校验失败
pip install mediapipe iris 失败?numpy/protobuf 版本锁死是关键
Mediapipe 的 iris 模块(如 mediapipe.solutions.iris)不是独立包,它藏在 mediapipe 主包里,且对底层依赖极其敏感。常见报错如 AttributeError: module 'numpy' has no attribute 'float' 或 TypeError: Descriptors cannot be created directly,本质都是版本链断裂。
- 强制指定版本组合:
pip install numpy==1.23.5 protobuf==4.25.3 mediapipe==0.10.14 - Python 必须 ≤ 3.10(3.11+ 已不兼容)
- macOS 用户额外注意:M1/M2 芯片需安装 arm64 构建版,x86_64 包会报
mach-o file is incompatible - 模型文件不随 pip 安装自动下载,需手动从
mediapipe/modules/iris_landmark复制到运行目录,否则初始化时FileNotFoundError
InterSystems IRIS 社区版装在 Ubuntu 上缺 libtinfo5?别硬装,换源或补依赖
IRIS_Community-xxx-lnxubuntux64.tar.gz 解压后执行 ./irisinstall,第一行就挂:error while loading shared libraries: libtinfo5.so.5: cannot open shared object file。这不是权限问题,是 Ubuntu 22.04+ 默认不再预装 libtinfo5。
- Ubuntu 22.04/24.04:运行
sudo apt install libtinfo5即可 - 若 apt 找不到,加旧源:
echo "deb http://archive.ubuntu.com/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/focal.list && sudo apt update && sudo apt install libtinfo5 - 安装完成后务必检查
iris.key是否已放入install-dir/mgr/,否则启动后进管理门户会提示「缺少许可证」 - 首次启动可能卡在
Waiting for InterSystems IRIS...,等满 2 分钟再查日志,别急着 kill
三个 Iris 同名不同命,装之前没确认清楚技术栈,后面所有报错都指向错误的方向。尤其是 Mediapipe 的 iris 模块,它不提供独立安装入口,也不报“找不到 iris”,而是静默返回空结果或崩溃在 solutions.iris.Iris 初始化那一行——这种无声失败最耗时间。


















