Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
412 views
in Technique[技术] by (71.8m points)

python - Permission denied when installing Tensorflow

I am trying to install TensorFlow by Anaconda(My Python is 3.5.2 edition).

When I run:

(tensorflow)C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl 

According to the guide in Tensorflow.org, the following tips emerge:

Exception:
Traceback (most recent call last):
File "C:UsersAnaconda3libsite-packagespipasecommand.py", line 215, in main
    status = self.run(options, args)
File "C:UsersAnaconda3libsite-packagespipcommandsinstall.py", line 317, in run
prefix=options.prefix_path,
File "C:Anaconda3libsite-packagespip
eq
eq_set.py", line 742, in install
**kwargs
File "C:UsersAnaconda3libsite-packagespip
eq
eq_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "C:UsersAnaconda3libsite-packagespip
eq
eq_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "C:UsersAnaconda3libsite-packagespipwheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "C:UsersAnaconda3libsite-packagespipwheel.py", line 324, in clobber
shutil.copyfile(srcfile, destfile)
File "C:UsersAnaconda3libshutil.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'

I don't know what causes this error. Can someone help me with that?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Might be late but I got the exact same error and this is what happened. My issue was that there was some file that was being used inside numpy that was locked by anaconda(or some other process) I guess and tensorflow needed that file. Hence I got permission denied. All I did was shut down every process anaconda, jupyter etc and ran:

1) conda update --all
2) pip install --ignore-installed tensorflow

Open your cmd as an administrator and do not activate tensorflow. Just simply fire commands from your cmd. For eg: C:\> pip install --ignore-installed tensorflow (your directory may vary) should be fine. Let me know if you get stuck.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...