windows下pip安装python模块时报错总结
2017-01-12 18:05
507 查看
前言:
这几天把python版本升级后,发现pip安装模块好多都报错(暂不确定是不是因为升级导致的),我定睛一看,发现是权限的问题,那么怎么解决呢?
注意看我标红的那部分,提示说权限错误,拒绝访问,我们这样解决:
使用管理员身份运行cmd
这几天把python版本升级后,发现pip安装模块好多都报错(暂不确定是不是因为升级导致的),我定睛一看,发现是权限的问题,那么怎么解决呢?
1 权限问题
C:\Users\ljf>pip install xlwt
Exception: Traceback (most recent call last): File "c:\program files\python35\lib\site-packages\pip\basecommand.py", line 21 1, in main status = self.run(options, args) File "c:\program files\python35\lib\site-packages\pip\commands\install.py", li ne 311, in run root=options.root_path, File "c:\program files\python35\lib\site-packages\pip\req\req_set.py", line 64 6, in install **kwargs File "c:\program files\python35\lib\site-packages\pip\req\req_install.py", lin e 803, in install self.move_wheel_files(self.source_dir, root=root) File "c:\program files\python35\lib\site-packages\pip\req\req_install.py", lin e 998, in move_wheel_files isolated=self.isolated, File "c:\program files\python35\lib\site-packages\pip\wheel.py", line 339, in move_wheel_files clobber(source, lib_dir, True) File "c:\program files\python35\lib\site-packages\pip\wheel.py", line 310, in clobber ensure_dir(destdir) File "c:\program files\python35\lib\site-packages\pip\utils\__init__.py", line 71, in ensure_dir os.makedirs(path) File "c:\program files\python35\lib\os.py", line 241, in makedirs mkdir(name, mode) PermissionError: [WinError 5] 拒绝访问。: 'c:\\program files\\python35\\Lib\\sit e-packages\\xlwt'
注意看我标红的那部分,提示说权限错误,拒绝访问,我们这样解决:
使用管理员身份运行cmd
相关文章推荐
- MovingAverage-滑动平均
- Python使用pyserial进行串口通信
- wxPython常用控件--wx.Grid,wx.ListBox,wx.ListCtrl,wx.TreeCtrl
- hjr-Python:Django
- 欢迎使用CSDN-markdown编辑器
- python tarfile
- python:logging模块(上)
- python-requests 简单实现数据抓取
- Python抓取CSV文件中数据
- python学习记录---匿名函数
- Python 闭包的理解
- Python·Jupyter Notebook各种使用方法记录·持续更新
- Python学习(二)—— Generator
- python常用模块详解
- python学习记录---不定长参数
- spyder中ipython报kernel deid ,Restart kernel解决办法
- 有趣的numpy应用--游客来的的那天星期几?
- python+selenium移动到二级元素按钮上和点击二级元素上的按钮
- PyAutoGUI-python版的autoit/AHK
- Python爬虫学习——获取网页