Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在windows上安装tensorflow时出错_Python_Tensorflow_Anaconda - Fatal编程技术网

Python 在windows上安装tensorflow时出错

Python 在windows上安装tensorflow时出错,python,tensorflow,anaconda,Python,Tensorflow,Anaconda,嗨,我正试图用Anaconda安装tensorflow。我遵循官方网站的指示: conda create-n tensorflow pip python=3.5 激活tensorflow (tensorflow)C:\Users\guar8001>pip安装tensorflow 我得到以下错误: (tensorflow) C:\Users\guar8001>pip install tensorflow Collecting tensorflow Using cached tensor

嗨,我正试图用Anaconda安装tensorflow。我遵循官方网站的指示:

conda create-n tensorflow pip python=3.5

激活tensorflow

(tensorflow)C:\Users\guar8001>pip安装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结束,这意味着它在重新启动之前不会消失)