在学习pythoh过程中,在用pip安装模块时,出现错误,并且不能成功的安装python需要的模块,发现是我们的权限不够,所以拒绝访问,接下来就看我是怎么解决的吧!!
权限不够,could not create,所以拒绝访问
C:Usersll>pip install jieba
Collecting jieba
Downloading https://files.pythonhosted.org/packages/71/46/c6f9179f73b818d5827202ad1c4a94e371a29473b7f043b736b4dab6b8cd/jieba-0.39.zip (7.3MB)
100% |████████████████████████████████| 7.3MB 95kB/s
Installing collected packages: jieba
Running setup.py install for jieba ... error
Complete output from command "d:program filespythonpython.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\ll\AppData\Local\Temp\pip-install-kcnh9wto\jieba\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersllAppDataLocalTemppip-record-s5lrjd8winstall-record.txt --single-version-externally-managed --compile:
......
......
running install_lib
creating d:program filespythonLibsite-packagesjieba
error: could not create 'd:program filespythonLibsite-packagesjieba': 拒绝访问。
----------------------------------------
C:Usersll>error: could not create 'd:program filespythonLibsite-packagesjieba': 拒绝访问
错误原因 :
"C:Usersll>error: could not create 'd:program filespythonLibsite-packagesjieba': 拒绝访问",提示我们并不能创建这个文件,说明我们没有这个权限
解决方法:
- 首先找到"d:program files "这个文件
- 在这个目录中找到"python"这个文件,右键单击这个文件,点击"属性"
- 然后切换到属性里安全这个子选项中,选择当前登录的用户如下图:
4.点击需要添加的权限,然后点击应用,根据情况而定,然后应用,这样就完美解决pip安装权限不够,无法访问的问题了