安装turicreate时出现tensorflow错误?

时间:2019-12-29 03:03:34

标签: python tensorflow machine-learning turi-create coursera-api

当我安装turicreate软件包时,它给我以下错误:

Collecting tensorflow>=2.0.0 (from turicreate)
  Could not find a version that satisfies the requirement tensorflow>=2.0.0 (from turicreate) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow>=2.0.0 (from turicreate)
我在安装tensorflow 2.0.0时遇到了相同的情况。

然后我设法使用pip3 install tensorflow==2.0.0a0安装了对版本进行了修改的tensorflow2(在'2.0.0'之后添加'a0','b0','b1')。但是,即使安装了tensorflow2.0.0a0,我仍然无法通过turicreate的安装,并导致与上面所示相同的“ tensorflow错误”。 我正在使用python 3.6,numpy 1.16.5。

你能帮我吗?

4 个答案:

答案 0 :(得分:1)

当我尝试在装有某些数据科学库的Jupyter Docker映像上安装turicreate时遇到同样的问题:

  • 图片:jupyter/scipy-notebook
  • 包装:熊猫,numexpr,matplotlib,scipy,seaborn,scikit-learn,scikit-image,sympy,cython,patsy,statsmodel,cloudpickle,莳萝,numba,散景,sqlalchemy,hdf5,vincent,beautifulsoup,protobuf, xlrd软件包
  • 错误消息:

    Could not find a version that satisfies the requirement tensorflow>=2.0.0 (from turicreate) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
    No matching distribution found for tensorflow>=2.0.0 (from turicreate)
    

但是,当我拍摄基本的(剥离的)Jupyter图像时,它起作用了:

  • 图片:jupyter/base-notebook
  • 软件包:git,emacs,jed,nano,tzdata和解压缩

turicreate的安装说明:

from __future__ import print_function
import sys

!{sys.executable} -m pip install turicreate

输出:

Successfully installed absl-py-0.9.0 astor-0.8.1 cachetools-4.0.0 coremltools-3.1 gast-0.2.2 google-auth-1.10.0 google-auth-oauthlib-0.4.1 google-pasta-0.1.8 grpcio-1.26.0 h5py-2.10.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 llvmlite-0.30.0 markdown-3.1.1 numba-0.46.0 numpy-1.16.4 opt-einsum-3.1.0 pandas-0.25.3 pillow-6.2.1 prettytable-0.7.2 protobuf-3.11.2 pyasn1-0.4.8 pyasn1-modules-0.2.7 pytz-2019.3 requests-oauthlib-1.3.0 resampy-0.2.1 rsa-4.0 scipy-1.4.1 tensorboard-2.0.2 tensorflow-2.0.0 tensorflow-estimator-2.0.1 termcolor-1.1.0 turicreate-6.0 werkzeug-0.16.0 wrapt-1.11.2

因此,我想问题是您在环境中安装的某些库与turicreate冲突。也许您应该尝试使用上述Docker映像或尝试创建虚拟环境,以便隔离工作(未对此进行测试)。

有关不同Docker映像的信息:

https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-scipy-notebook

Turicreate安装说明在虚拟环境中进行注释:

https://github.com/apple/turicreate#installation

答案 1 :(得分:0)

首先,尝试使用最新版本的pip pip3 install -U pip,通常,问题比以前少。

否则,如果以上操作失败,您可以尝试使用pip3 install --no-deps turicreate来运行以消除错误。 您需要手动安装依赖项。全部110个。 您可以按照以下方式生成包含这些内容的列表:

import os;
s = os.popen('pip3 freeze turicreate').read()
for q in [x.split('==')[0] for x in s.split('\n')]:
  os.system('echo {} >> t.tmp'.format(q)

然后可以使用pip install -r t.tmpfor x in $(cat t.tmp); do pip3 install $x; done安装它们 我不确定与此有关的与tensorflow或其他任何失败的包相关的功能如何受到影响,但是我设法使用此方法获得了简单的框架。 然后,我升级了pip并安装了所有无法正常工作的库。

答案 2 :(得分:0)

尝试升级点数。 Tensorflow 2.0需要安装较新版本的pip。 就个人而言,这行得通,

  1. 升级点
  2. 安装了tf2.0
  3. 安装了turicreate。

答案 3 :(得分:0)

升级点

# On Linux or macOS:
pip3 install -U pip

# On Windows:
python -m pip3 install -U pip

安装turicreate

pip3 install turicreate

这将解决您的问题

相关问题