我正在使用python 3.5.3,现在我想安装pandas和numpy但不能,以下是cmd中的错误,任何人都可以帮助我吗?
C:\Program Files\Python35\Scripts>py -3.5 -m pip install pandas
Collecting pandas
Using cached pandas-0.20.1-cp35-cp35m-win_amd64.whl
Collecting python-dateutil>=2 (from pandas)
Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting numpy>=1.7.0 (from pandas)
Using cached numpy-1.12.1-cp35-none-win_amd64.whl
Collecting pytz>=2011k (from pandas)
Using cached pytz-2017.2-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil>=2->pandas)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, numpy, pytz, pandas
Exception:
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Program Files\Python35\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "C:\Program Files\Python35\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "C:\Program Files\Python35\lib\site-packages\pip\wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "C:\Program Files\Python35\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\\Program Files\\Python35\\Lib\\site-packages\\six.py'
答案 0 :(得分:7)
正如其他人指出的那样,你需要使用admin权限运行命令。
如何通过Windows版本执行此操作varies,但在Windows 8和10上,您只需按Windows + X(或只需右键单击“开始”按钮)即可。在菜单上,选择“命令提示符(管理员)。”
答案 1 :(得分:3)
您使用的命令行无法访问C:\\Program Files\\Python35\\Lib\\site-packages\\six.py
。
在具有管理权限的命令行中运行该命令。
答案 2 :(得分:0)
在管理员模式下运行命令行,然后:
pip instal pandas