簡體   English   中英

在Windows上安裝TensorFlow時出錯

[英]Getting error while installing tensorflow on windows

嗨,我正在嘗試使用Anaconda安裝tensorflow。 我正在遵循官方網站上的指示:

https://www.tensorflow.org/install/install_windows

conda create -n tensorflow pip python=3.5

activate tensorflow

(tensorflow) C:\\Users\\guar8001>pip install tensorflow

我收到以下錯誤:

(tensorflow) C:\Users\guar8001>pip install tensorflow
Collecting tensorflow
  Using cached tensorflow-1.7.0-cp35-cp35m-win_amd64.whl

Exception:
Traceback (most recent call last):
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 391, in _rmtree_unsafe
    os.rmdir(path)
OSError: [WinError 145] The directory is not empty: 'C:\\Users\\guar8001\\AppData\\Local\\Temp\\pip-install-fkfkeii_\\tensorflow\\tensorflow-1.7.0.data\\purelib\\tensorflow\\python'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\basecommand.py", line 228, in main
    status = self.run(options, args)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\commands\install.py", line 388, in run
    wheel_cache.cleanup()
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\temp_dir.py", line 58, in __exit__
    self.cleanup()
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\temp_dir.py", line 81, in cleanup
    rmtree(self.path)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\six.py", line 693, in reraise
    raise value
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\misc.py", line 108, in rmtree
    onerror=rmtree_errorhandler)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 494, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 393, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\misc.py", line 120, in rmtree_errorhandler
    func(path)
OSError: [WinError 145] The directory is not empty: 'C:\\Users\\guar8001\\AppData\\Local\\Temp\\pip-install-fkfkeii_\\tensorflow\\tensorflow-1.7.0.data\\purelib\\tensorflow\\python'

我如何安裝tensorflow。

我可以想到幾種情況:

1.在窗口中打開構建目錄

2.反病毒

其中兩秒鍾是暫時的,等待可能會解決問題。 我懷疑第一個(在窗口中打開)是更一般的“實例正在使用目錄作為cwd”的實例,該實例在該過程完成之前不會消失(並且可能會發生持久性后台進程以該目錄為cwd,這意味着它必須等到重啟后才能消失。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM