【问题标题】:tensorflow error when installing turicreate?安装 turicreate 时出现 tensorflow 错误?
【发布时间】:2020-04-18 08:34:44
【问题描述】:

当我安装 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。

你能帮帮我吗?

【问题讨论】:

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


    【解决方案1】:

    升级点

    # On Linux or macOS:
    pip3 install -U pip
    
    # On Windows:
    python -m pip3 install -U pip
    

    安装 turicreate

    pip3 install turicreate
    

    这会解决你的问题

    【讨论】:

    • 这是最好的答案!
    【解决方案2】:

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

    • 图片:jupyter/scipy-notebook
    • 包:pandas、numexpr、matplotlib、scipy、seaborn、scikit-learn、scikit-image、sympy、cython、patsy、statsmodel、cloudpickle、dill、numba、bokeh、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

    【讨论】:

    • 非常感谢,在virtualenv下解决了
    • 我发现它适用于“pip install”而不是“pip3 install”,这导致我可以使用 python2 而不是 python3 安装和导入 turicreate。而“pip3 install”在新的虚拟环境下也会产生同样的错误。
    • 您好,您能帮帮我吗,我没有得到您的答复
    【解决方案3】:

    首先,尝试使用最新版本的 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 或任何其他失败包相关的功能性如何受此影响,但我已经设法让简单的 sframe 使用这种方法。 然后我升级了 pip 和所有无法正常工作的库。

    【讨论】:

      【解决方案4】:

      尝试升级 pip。 TensorFlow 2.0 需要安装更新版本的 pip。 就个人而言,这很有效,

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

      【讨论】:

        猜你喜欢
        • 2018-07-20
        • 2020-01-03
        • 1970-01-01
        • 2021-05-29
        • 1970-01-01
        • 2020-04-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多