在安装tensorflowjs时出现错误,可以安装其他包,只是这个包以失败告终。
我尝试pip install --user pyspider,失败。我升级了pip版本,还是失败了。我先安装了tf_nightly模块,然后运行'pip install tensorflowjs',仍然失败。
C:\Users\Jingyi>pip install tensorflowjs
Collecting tensorflowjs
Using cached https://files.pythonhosted.org/packages/79/29/35e1aa467436ff46b98df65a08c49faaedb3429e1c512d1d90fe308040a0/tensorflowjs-1.0.1-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 six==1.11.0 (from tensorflowjs)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting tf-nightly-2.0-preview>=2.0.0.dev20190304 (from tensorflowjs)
Using cached https://files.pythonhosted.org/packages/4c/13/8fa7c91176d299759487d90ab201256941b43a48ecbf033a2a726f4dafce/tf_nightly_2.0_preview-2.0.0.dev20190509-cp36-cp36m-win_amd64.whl
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\Jingyi\\AppData\\Local\\Temp\\pip-install-4ytziwpr\\tf-nightly-2.0-preview\\tf_nightly_2.0_preview-2.0.0.dev20190509.data/purelib/tensorflow/include/tensorflow/include/external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSyclConvertToDeviceExpression.h'我希望能成功安装tensorflowjs。
发布于 2019-05-14 16:32:06
这是由于windows路径长度限制造成的,您可以在下面尝试:
按Windows键,键入Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem.
Enable Win32 long paths选项并启用它。
中工作
发布于 2019-05-10 16:23:04
您可以创建一个virtualenv并在其中安装tensorflow。
首先创建一个virtualenv:
python3 -m venv envname接下来,您必须激活它
source envname/bin/activate然后安装程序包
pip install pyspider当您使用virtualenv时,不需要--user标志。
当您在本地使用python项目时,使用virtualenv总是更好的方法。
https://stackoverflow.com/questions/56073401
复制相似问题