代码之家  ›  专栏  ›  技术社区  ›  Jean-Pat

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

  •  0
  • Jean-Pat  · 技术社区  · 8 年前

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

    第一次生成失败时:

    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_包 ~/development/Arch TensorFlow/TensorFlow~/development/Arch TensorFlow/TensorFlow ~/development/Arch TensorFlow/TensorFlow jeudi 23 aot 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”目录下找不到与“*”匹配的文件

    最后我尝试安装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.
    
    1 回复  |  直到 8 年前
        1
  •  0
  •   Jean-Pat    8 年前

    程序包安装成功:

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