pip - pip install tensorflowjs 时出错 — 由于 EnvironmentError 无法安装软件包:[Errno 2] 没有这样的文件或目录:
问题描述
安装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。
解决方案
这是由windows路径长度限制引起的,您可以尝试以下方法:
- 点击 Windows 键,键入
gpedit.msc
并按 Enter。 - 导航到
Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem
。 - 双击该
Enable Win32 long paths
选项并启用它。 - 然后重启电脑就可以了
推荐阅读
- python - How to remove elements from a list under some conditions?
- ios - I have a about iOS Block modifiers and scopes and need help. Description show in full code
- r - ggplot密度图:每组不同的x轴
- angular - Ng2-Dragula: Enable drag at run time
- tsql - Incorrect syntax near 'CAST' Error while using dynamic sql
- angular - 将 angular.json 转换为 angular-cli.json?
- azure - 使用 Microsoft 帐户登录 Azure AD V2 应用
- excel - 如何清理这段代码以使其更容易和更具适应性?
- javascript - Trying to make a super simple clicker game but im getting NaN instead of numbers
- python - pandas: How to search by a list of values and return in the same order?