构建tensorflow 1.10成功,但包安装失败

构建tensorflow 1.10成功,但包安装失败,tensorflow,build,ubuntu-16.04,Tensorflow,Build,Ubuntu 16.04,我尝试从python3虚拟环境中使用cuda构建tensorflow 1.10: /配置成功 bazel的第一步构建成功() $bazel build--config=opt--config=cuda//tensorflow/tools/pip_包:build_-pip_包 第一次生成失败时: import keras_applications ModuleNotFoundError: No module named 'keras_applications' Target //tensorf

我尝试从python3虚拟环境中使用cuda构建tensorflow 1.10:

  • /配置成功
  • bazel的第一步构建成功()

    $bazel build--config=opt--config=cuda//tensorflow/tools/pip_包:build_-pip_包

第一次生成失败时:

import keras_applications
ModuleNotFoundError: No module named 'keras_applications'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 9114.151s, Critical Path: 335.72s
INFO: 6696 processes: 6696 local.
FAILED: Build did NOT complete successfully
但在安装了一些keras组件和h5py之后:

pip install keras_applications==1.0.4 --no-deps
Collecting keras_applications==1.0.4
  Downloading https://files.pythonhosted.org/packages/54/90/8f327deaa37a71caddb59b7b4aaa9d4b3e90c0e76f8c2d1572005278ddc5/Keras_Applications-1.0.4-py2.py3-none-any.whl (43kB)
    100% |████████████████████████████████| 51kB 633kB/s 
Installing collected packages: keras-applications
Successfully installed keras-applications-1.0.4
(DeepFish) jeanpat@Dell-T5500:~/Developpement/Arch-TensorFlow/tensorflow$ pip install keras_preprocessing==1.0.2 --no-deps
Collecting keras_preprocessing==1.0.2
  Downloading https://files.pythonhosted.org/packages/71/26/1e778ebd737032749824d5cba7dbd3b0cf9234b87ab5ec79f5f0403ca7e9/Keras_Preprocessing-1.0.2-py2.py3-none-any.whl
Installing collected packages: keras-preprocessing
Successfully installed keras-preprocessing-1.0.2
(DeepFish) jeanpat@Dell-T5500:~/Developpement/Arch-TensorFlow/tensorflow$ pip install h5py==2.8.0
Collecting h5py==2.8.0
  Downloading https://files.pythonhosted.org/packages/8e/cb/726134109e7bd71d98d1fcc717ffe051767aac42ede0e7326fd1787e5d64/h5py-2.8.0-cp36-cp36m-manylinux1_x86_64.whl (2.8MB)
    100% |████████████████████████████████| 2.8MB 1.9MB/s 
Requirement already satisfied: numpy>=1.7 in /home/jeanpat/anaconda3/envs/DeepFish/lib/python3.6/site-packages (from h5py==2.8.0) (1.15.0)
Requirement already satisfied: six in /home/jeanpat/anaconda3/envs/DeepFish/lib/python3.6/site-packages (from h5py==2.8.0) (1.11.0)
keras-applications 1.0.4 has requirement keras>=2.1.6, but you'll have keras 2.0.8 which is incompatible.
Installing collected packages: h5py
  Found existing installation: h5py 2.7.1
    Uninstalling h5py-2.7.1:
      Successfully uninstalled h5py-2.7.1
Successfully installed h5py-2.8.0
可以完成构建:

Target //tensorflow/tools/pip_package:build_pip_package up-to-date:
  bazel-bin/tensorflow/tools/pip_package/build_pip_package
INFO: Elapsed time: 55.947s, Critical Path: 29.05s
INFO: 40 processes: 40 local.
INFO: Build completed successfully, 43 total actions
  • 第二步生成也成功,但出现了一些警告:

    $bazel-bin/tensorflow/tools/pip_包/build_-pip_包/tmp/tensorflow_包 jeudi 23 aoút 2018,15:02:24(UTC+0200):===在目录中准备源:/tmp/tmp.dEwVvSzrd0 ~/Developpement/Arch TensorFlow/TensorFlow~/Developpement/Arch TensorFlow/TensorFlow ~/development/Arch TensorFlow/TensorFlow jeudi 23 aoút 2018,15:02:31(UTC+0200):==建筑车轮

    警告:在目录“”下找不到与“.pd”匹配的文件

    警告:在目录“”下找不到与“.dll”匹配的文件

    警告:在目录“”下找不到与“.lib”匹配的文件

    警告:在目录“tensorflow/include/tensorflow”下找不到与“*.h”匹配的文件

    警告:在目录“tensorflow/include/Eigen”下找不到与“*”匹配的文件

    警告:在目录“tensorflow/include/google”下找不到与“*.h”匹配的文件

    警告:在目录“tensorflow/include/third_party”下找不到与“*”匹配的文件

    警告:在目录“tensorflow/include/unsupported”下找不到与“*”匹配的文件

    jeudi 23 aoút 2018,15:03:09(UTC+0200):==输出控制盘文件位于:/tmp/tensorflow_pkg中

最后,我尝试安装python包:

$ pip install /tmp/tensorflow_pkg/tensorflow-1.10.0-py2-none-any.whl
Requirement '/tmp/tensorflow_pkg/tensorflow-1.10.0-py2-none-any.whl' looks like a filename, but the file does not exist
tensorflow-1.10.0-py2-none-any.whl is not a supported wheel on this platform.

包安装成功,出现以下错误:

$ pip install /tmp/tensorflow_pkg/tensorflow*.whl