[英]Python-Error installing python package (libmagic)
When I try to install libmagic
using pip install python-libmagic
, I get the following error: 当我尝试安装libmagic
使用pip install python-libmagic
,我得到以下错误:
Could not install packages due to an EnvironmentError: [Error 13] Permission denied: 'c:\\users\\*****\\anaconda\\Lib\\site-pakages\\_cffi_backend.cp36-win_amd64.pyd' Consider using the
--user
option or check the permissions. 由于环境错误而无法安装软件包:[错误13]权限被拒绝:'c:\\ users \\ ***** \\ anaconda \\ Lib \\ site-pakages \\ _cffi_backend.cp36-win_amd64.pyd'考虑使用--user
选项或检查权限。
What should I do to rectify this error? 我该怎么办才能纠正此错误?
You are trying to install the package to a system folder which you don't have permissions to write to. 您正在尝试将该软件包安装到您没有写权限的系统文件夹中。 You have two options(use only one of them): 您有两种选择(仅使用其中一种):
1-setup a virtual env to install the package (recommended): 1-设置虚拟环境以安装软件包(推荐):
python3 -m venv env
source ./env/bin/activate
python -m pip install python-libmagic[samples]
2. install the package to the user folder: 2.将软件包安装到用户文件夹:
python -m pip install --user python-libmagic[samples]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.