我正在尝试安装Anaconda的TensorFlow(My Python是3.5.2版).
当我跑:
(tensorflow)C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
根据Tensorflow.org中的指南,出现了以下提示:
Exception: Traceback (most recent call last): File "C:\Users\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "C:\Users\Anaconda3\lib\site-packages\pip\commands\install.py", line 317, in run prefix=options.prefix_path, File "C:Anaconda3\lib\site-packages\pip\req\req_set.py", line 742, in install **kwargs File "C:\Users\Anaconda3\lib\site-packages\pip\req\req_install.py", line 831, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "C:\Users\Anaconda3\lib\site-packages\pip\req\req_install.py", line 1032, in move_wheel_files isolated=self.isolated, File "C:\Users\Anaconda3\lib\site-packages\pip\wheel.py", line 346, in move_wheel_files clobber(source, lib_dir, True) File "C:\Users\Anaconda3\lib\site-packages\pip\wheel.py", line 324, in clobber shutil.copyfile(srcfile, destfile) File "C:\Users\Anaconda3\lib\shutil.py", line 115, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Anaconda3\\Lib\\site-packages\\numpy\\core\\multiarray.cp35-win_amd64.pyd'
我不知道是什么导致了这个错误.有人可以帮助我吗?
可能会迟到但我得到完全相同的错误,这就是发生的事情.我的问题是有一些文件正在numpy中使用,被anaconda(或其他一些进程)锁定,我想和tensorflow需要该文件.因此我得到了许可被拒绝.我所做的就是关闭每个进程anaconda,jupyter等并运行:
1) conda update --all 2) pip install --ignore-installed tensorflow
以管理员身份打开cmd,不要激活张量流.只需从您的cmd中激活命令即可.例如:( C:\\> pip install --ignore-installed tensorflow
您的目录可能会有所不同)应该没问题.如果你遇到困难,请告诉我.