简体   繁体   English

安装 turicreate 时出现 tensorflow 错误?

[英]tensorflow error when installing turicreate?

When I install turicreate package, it gives me the following error:当我安装 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)

which I encountered the same when installing tensorflow 2.0.0.我在安装 tensorflow 2.0.0 时遇到了同样的问题。

And I managed to install tensorflow2 with modification to the version(add a 'a0','b0','b1' after '2.0.0') using pip3 install tensorflow==2.0.0a0 .我设法使用pip3 install tensorflow==2.0.0a0安装了 tensorflow2 并修改了版本(在 '2.0.0' 之后添加了 'a0','b0','b1')。 However, I still cannot pass the installation of turicreate even with tensorflow2.0.0a0 installed and result in the same 'tensorflow error' shown above.但是,即使安装了 tensorflow2.0.0a0,我仍然无法通过 turicreate 的安装,并导致上述相同的“tensorflow 错误”。 I am using python 3.6, numpy 1.16.5.我正在使用 python 3.6,numpy 1.16.5。

Can you please help me out?你能帮我一下吗?

Upgrade pip升级点

# On Linux or macOS:
pip3 install -U pip

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

Install turicreate安装图里创建

pip3 install turicreate

This will solve your problem这将解决您的问题

I was having the same problem when I tried to install turicreate on the Jupyter Docker image that comes with some data science libraries loaded:当我尝试在加载了一些数据科学库的 Jupyter Docker 镜像上安装turicreate时遇到了同样的问题:

  • Image: jupyter/scipy-notebook图片: jupyter/scipy-notebook
  • Packages: pandas, numexpr, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh, sqlalchemy, hdf5, vincent, beautifulsoup, protobuf, and xlrd packages包:pandas、numexpr、matplotlib、scipy、seaborn、scikit-learn、scikit-image、sympy、cython、patsy、statsmodel、cloudpickle、dill、numba、bokeh、sqlalchemy、hdf5、vincent、beautifulsoup、protobuf 和 xlrd 包
  • Error message:错误信息:

     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)

However, when I took the basic (stripped) Jupyter image, it worked:但是,当我使用基本的(剥离的)Jupyter 图像时,它起作用了:

  • Image: jupyter/base-notebook图片: jupyter/base-notebook
  • Packages: git, emacs, jed, nano, tzdata, and unzip包:git、emacs、jed、nano、tzdata 和 unzip

Installation instructions for turicreate: turicreate 安装说明:

from __future__ import print_function
import sys

!{sys.executable} -m pip install turicreate

Output:输出:

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

So, I guess the problem is that some of the libraries that you have installed in your environment conflict with turicreate.所以,我猜问题是你在你的环境中安装的一些库与 turicreate 冲突。 Perhaps you should try to use the above mentioned Docker image or try to create a virtual environment so you work in isolation (not tested this).也许你应该尝试使用上面提到的 Docker 镜像,或者尝试创建一个虚拟环境,这样你就可以孤立地工作(没有测试过)。

Info on the different Docker images:有关不同 Docker 映像的信息:

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

Turicreate installation instructions where they comment on the virtual environment: Turicreate 安装说明,他们对虚拟环境的评论:

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

Firstly, give try to a latest version of pip pip3 install -U pip , usually, it has less problems than previous.首先,尝试最新版本的 pip pip3 install -U pip ,通常问题比以前少。

Otherwise, if above fails, you can try running with pip3 install --no-deps turicreate to get past the cryptic error.否则,如果上述失败,您可以尝试使用pip3 install --no-deps turicreate运行以pip3 install --no-deps turicreate神秘错误。 You'll need to install the dependencies manually.您需要手动安装依赖项。 All 110 of them.全部 110 个。 You can generate a list of them with something along these lines:您可以使用以下内容生成它们的列表:

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)

Then they can be installed with pip install -r t.tmp or for x in $(cat t.tmp); do pip3 install $x; done然后可以使用pip install -r t.tmpfor x in $(cat t.tmp); do pip3 install $x; done for x in $(cat t.tmp); do pip3 install $x; done for x in $(cat t.tmp); do pip3 install $x; done I'm not sure how the funtionality related to the tensorflow or any other failed package is affected by this but I've managed to get simple sframes working with this method. for x in $(cat t.tmp); do pip3 install $x; done我不确定与 tensorflow 或任何其他失败包相关的功能如何受此影响,但我已经设法使用这种方法获得简单的 sframe。 Then I've upgraded the pip and all the libs that weren't working installed without a problem.然后我升级了 pip 和所有无法正常工作的库都没有问题。

Try upgrading pip.尝试升级 pip。 Tensorflow 2.0 needs newer versions of pip to be installed. Tensorflow 2.0 需要安装更新版本的 pip。 Personally this worked,就个人而言,这有效,

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

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

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