首页 > 解决方案 > TensorFlow.js 无法在 Windows 10 中安装

问题描述

我尝试使用命令(pip install tensorflowjs)在 Windows 10 的终端中安装 tensorflow.js,但它显示如下错误:

C:\Users\GOT>pip install tensorflowjs
Requirement already satisfied: tensorflowjs in c:\users\got\appdata\local\programs\python\python36\lib\site-packages (1.0.1)
Collecting keras==2.2.4 (from tensorflowjs)
  Using cached https://files.pythonhosted.org/packages/5e/10/aa32dad071ce52b5502266b5c659451cfd6ffcbf14e6c8c4f16c0ff5aaab/Keras-2.2.4-py2.py3-none-any.whl
Collecting tensorflow-hub==0.3.0 (from tensorflowjs)
  Using cached https://files.pythonhosted.org/packages/9e/f0/3a3ced04c8359e562f1b91918d9bde797c8a916fcfeddc8dc5d673d1be20/tensorflow_hub-0.3.0-py2.py3-none-any.whl
Collecting numpy==1.15.1 (from tensorflowjs)
  Using cached https://files.pythonhosted.org/packages/fb/7d/f8b97d97809f184d90faf320fa8e2e7eac994844c5e6c57adbed1283e9e9/numpy-1.15.1-cp36-none-win_amd64.whl
Collecting h5py==2.8.0 (from tensorflowjs)
  Using cached https://files.pythonhosted.org/packages/12/6c/00c38c5ce9322f1cc421d93217c44739646a106c61859622eccc297a5c05/h5py-2.8.0-cp36-cp36m-win_amd64.whl
Collecting tf-nightly-2.0-preview>=2.0.0.dev20190304 (from tensorflowjs)
  Using cached https://files.pythonhosted.org/packages/74/b4/a891925420b003a1da4edf6281672ecebb51b1ee2136e8a15140c8c2b408/tf_nightly_2.0_preview-2.0.0.dev20190430-cp36-cp36m-win_amd64.whl
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\GOT\\AppData\\Local\\Temp\\pip-install-fjjm7m_r\\tf-nightly-2.0-preview\\tf_nightly_2.0_preview-2.0.0.dev20190430.data/purelib/tensorflow/include/tensorflow/include/external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSyclConvertToDeviceExpression.h' 

我试图从终端再次安装 tensorflow,但它仍然是同样的问题。

我正在使用这些依赖项:Python:3.6.8 Tensorflow:1.13.1 Keras:2.2.2

这个问题的解决方案是什么?

标签: tensorflowdeep-learningtensorflow.jstensorflowjs-converter

解决方案


看起来像一个路径长度问题。谷歌的第一个条目见这里


推荐阅读