简体   繁体   English

Pip 由于与 tensorflow 的明显版本冲突,安装 tensorflowjs 无法正常工作

[英]Pip install of tensorflowjs not working due to apparent version conflict with tensorflow

I'm currently in a conda virtual environment trying to pip install tensorflowjs, but every time that I do it gets stuck trying to find a version of tensorflow or Numpy which is compatible with tensorflowjs and eventually dies in the process.我目前在 conda 虚拟环境中尝试 pip 安装 tensorflowjs,但每次我这样做时都会卡住试图找到 tensorflow 或 Numpy 的版本,并最终与流程中的 tensorflow 兼容。 My command:我的命令:

pip install tensorflowjs pip 安装tensorflowjs

I want to run a conversion using tensorflowjs so I am not attached to doing it in python if there is a better way.我想使用 tensorflowjs 运行转换,所以如果有更好的方法,我不喜欢在 python 中进行转换。 But otherwise what is the best way to go about installing tensorflowjs.但除此之外,go 关于安装 tensorflowjs 的最佳方法是什么。

There also seems to be no way of doing it with a conda install as the package does not seem to exist in conda-forge.似乎也没有办法通过 conda 安装来做到这一点,因为在 conda-forge 中似乎不存在 package。

Downgrading to python 3.8 has solved the problem.降级到 python 3.8 已经解决了这个问题。 As of February 22nd 2021 tensorflow is not compatible with python 3.9.截至 2021 年 2 月 22 日,tensorflow 与 python 3.9 不兼容。

I installed the latest version of tensorflowjs in a Python 3.6 environment and checked the dependencies:我在 Python 3.6 环境中安装了最新版本的tensorflowjs并检查了依赖项:

tensorflowjs 3.1.0 Python Libraries and Tools for TensorFlow.js
├── h5py >=2.8.0,<3
├── six >=1.12.0,<2
├── tensorflow >=2.1.0,<3
└── tensorflow-hub >=0.7.0,<0.10

tensorflow itself is a dependency of tensorflowjs . tensorflow本身就是tensorflowjs的依赖。 So which version of tensorflowjs do you use?那么你用的是哪个版本的tensorflowjs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM