繁体   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