I am using python 3.5.3, and now I want to install pandas and numpy but not able to, following is the error in cmd, anyone can help me?
JavaScript
x
33
33
1
C:Program FilesPython35Scripts>py -3.5 -m pip install pandas
2
3
Collecting pandas
4
Using cached pandas-0.20.1-cp35-cp35m-win_amd64.whl
5
Collecting python-dateutil>=2 (from pandas)
6
Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
7
Collecting numpy>=1.7.0 (from pandas)
8
Using cached numpy-1.12.1-cp35-none-win_amd64.whl
9
Collecting pytz>=2011k (from pandas)
10
Using cached pytz-2017.2-py2.py3-none-any.whl
11
Collecting six>=1.5 (from python-dateutil>=2->pandas)
12
Using cached six-1.10.0-py2.py3-none-any.whl
13
Installing collected packages: six, python-dateutil, numpy, pytz, pandas
14
Exception:
15
Traceback (most recent call last):
16
File "C:Program FilesPython35libsite-packagespipbasecommand.py", line 215, in main
17
status = self.run(options, args)
18
File "C:Program FilesPython35libsite-packagespipcommandsinstall.py", line 342, in run
19
prefix=options.prefix_path,
20
File "C:Program FilesPython35libsite-packagespipreqreq_set.py", line 784, in install
21
**kwargs
22
File "C:Program FilesPython35libsite-packagespipreqreq_install.py", line 851, in install
23
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
24
File "C:Program FilesPython35libsite-packagespipreqreq_install.py", line 1064, in move_wheel_files
25
isolated=self.isolated,
26
File "C:Program FilesPython35libsite-packagespipwheel.py", line 345, in move_wheel_files
27
clobber(source, lib_dir, True)
28
File "C:Program FilesPython35libsite-packagespipwheel.py", line 323, in clobber
29
shutil.copyfile(srcfile, destfile)
30
File "C:Program FilesPython35libshutil.py", line 121, in copyfile
31
with open(dst, 'wb') as fdst:
32
PermissionError: [Errno 13] Permission denied: 'C:\Program Files\Python35\Lib\site-packages\six.py'
33
Advertisement
Answer
As others have pointed out you need to run the command with admin privileges.
How to do this varies by windows version, but on Windows 8 and 10 you can just press Windows+X (or just right-clicking the Start button). On the menu, choose “Command Prompt (Admin).”