且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为python hmmlearn软件包编译C代码时出错

更新时间:2023-10-15 23:02:52

我前一段时间遇到了相同的问题,发现了解决方案尽一切可能.在某些情况下,无论什么原因,当将包保存到缓存目录中时,pip都会跳过构建C扩展名.如果强制pip忽略缓存,则它总是从头开始构建软件包,因此解决方案是首先卸载软件包,然后运行pip install --no-cache-dir <package>

I ran into the same issue a while ago and found the solution by trying everything possible. For whatever reason in some cases pip skips building C-extensions, when a package is saved into the cache directory. If you force pip to ignore the cache, it always builds the package from scratch, so the solution is to uninstall the package in the first place and then run pip install --no-cache-dir <package>