问题描述
我尝试使用pip install
安装一些库,但是我不能这样做,因为每次我得到:
I tried to install some libraries with pip install
, however I can't because everytime I get:
PermissionError: [WinError 5] Permission denied: 'c:\\program files <x86>\\python35-32\\Lib\\site-packages\\PIL
想要安装PIL,ImageTK,Pillow等.每次都出现此错误,我该如何解决?我也尝试过easy_install
,但是没有用.我检查了一些与此有关的问题,但它们均无济于事,没有答案.
Wanted to install PIL, ImageTK, Pillow etc. I get this error everytime, how can I fix this? I tried easy_install
too, didn't work. I checked some questions about this but none of them worked either, there are no answer.
推荐答案
Windows阻止普通用户对此文件夹的访问.每当要pip
修改程序包时,都必须以 Administrator 身份启动命令行.
Windows blocks access to this folder for normal users. You have to start the command line as Administrator whenever you want pip
to modify your packages.
您可能希望使用虚拟环境.在您的用户具有访问权限的文件夹中创建环境,一切都会很好.
You might want to work with a virtual environment. Create your environment in a folder where your user has access rights and everything will be fine.
这篇关于Python 3.5 pip安装无法在Windows 7上运行-PermissionError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!