TensorFlow需要Numpy版本〜= 1.19.2,Matplotlib需要Numpy版本1.23.0

发布于 2025-02-10 19:27:43 字数 151 浏览 1 评论 0原文

我希望在安装大量Python软件包时,这将是一个相当普遍的问题A和B都不能在项目中共存。

在我的情况下,这发生在张量子流的情况下,需要Numpy 1.19.2和Matplotlib需要Numpy 1.23.0。

是否有已知的解决方法,或者您只需要选择其中一个?

I'd expect it to be a fairly common problem when installing a lot of python packages that there would be dependency collisions like package A depending on a certain version of package C and package B depending on another version of package C as a result of which both A and B cannot coexist in a project.

In my case this happens with tensorflow requiring numpy 1.19.2 and matplotlib requiring numpy 1.23.0.

Are there known workarounds to this or do you just have to pick one of them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疏忽 2025-02-17 19:27:43

我相信您可以尝试安装旧的matplotlib版本,这可能与Tensorflow所需的Python版本兼容。

也就是说,我建议您使用python的虚拟环境(如果您是尚未使用它)。您将能够安装/测试不同的库版本,而不会弄乱系统上的库。

I believe you can try installing an older matplotlib version, which will likely be compatible with the python version required by tensorflow.

That said, I recommend that you use Python's virtual environment (if you're not already using it). You will be able to install/test different libraries versions without messing up the ones on your system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文