当我尝试在终端中安装eyed3时出现以下错误。我可以知道如何纠正此错误并正确安装吗?
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dir_util.py", line 76, in mkpath
"could not create '%s': %s" % (head, exc.args[-1]))
distutils.errors.DistutilsFileError: could not create '/Library/Python/2.7/site-packages/eyed3': Permission denied
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/_l/ybspdsy946n9_jj1l7vplt540000gn/T/pip-build-j4vod5/eyed3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/_l/ybspdsy946n9_jj1l7vplt540000gn/T/pip-SEUrpQ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_l/ybspdsy946n9_jj1l7vplt540000gn/T/pip-build-j4vod5/eyed3/
答案 0 :(得分:0)
使用ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
1DPI (dot per inch) ~= 0.393701Pixels
,
其中sudo -H pip install eyed3
将授予您以root身份安装的权限,sudo
告诉sudo将HOME变量设置为目标用户的主目录