PyInstaller 在运行时遇到错误提示:'The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package (located in D:\Anaconda\lib\site-packages) using conda remove then try again.' 该提示意味着 PyInstaller 不兼容 Python 标准库中的 'pathlib' 包的旧版本,而你的系统中存在一个旧版本的 'pathlib' 包。

解决方法是先使用以下命令将旧版本的 'pathlib' 包从 Anaconda 环境中移除:

conda remove pathlib

然后再重新运行 PyInstaller。如果还出现其他问题,可以尝试更新 PyInstaller 或升级 Python 等其他解决方法。

PyInstaller 错误: 'pathlib' 包不兼容 - 解决方法

原文地址: https://www.cveoy.top/t/topic/lAmt 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录