LoginSignup
14
5

More than 3 years have passed since last update.

[win10]Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory

Last updated at Posted at 2019-06-06

原因について

同じエラーが発生した人の助けになればと思いこの記事を書きました。

>pip install tf-nightly-gpu-2.0-preview

pip installしているときに、以下のようなエラーが出ました。

Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\****\\AppData\\Local\\Temp\\pip-install-iwat19hr\\tf-nightly-gpu-2.0-preview\\tf_nightly_gpu_2.0_preview-2.0.0.dev20190605.data/purelib/tensorflow/include/tensorflow/include/external/eigen_archive/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h'

調べたところ、原因はパスが長すぎることらしいです。
win10はデフォルトでは260文字の制限があるため、これを解除する必要があります。

対策

  1. グループポリシーの編集を開く

無題.png
2. コンピューターの構成 > 管理用テンプレート > システム > ファイルシステム をクリック

970e2b21b92914473dbab1d2a89f7ae7.png

  1. Win32の長いパスを有効にする をダブルクリック
  2. 有効 をクリックして、画面下部の OK ボタンをクリック 369f65ba949361367cbe25f9441df5de.png

これでインストールができるようになるはずです。
(できない場合は他の方に聞いてください)

参考リンク

https://github.com/tensorflow/tensorflow/issues/24886
https://blog.beachside.dev/entry/2017/07/25/183000

14
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
5