error: could not create 'xxxxxx': Permission denied

先说解决办法————将目标文件夹赋予权限即可:

 sudo chmod -R 777 xxxxxx

然后输入密码。

我再重新安装python27的时候遇到了这个问题 pip install python2 时候报错信息如下:

    creating build/temp.macosx-10.14-intel-2.7
    creating build/temp.macosx-10.14-intel-2.7/src
    creating build/temp.macosx-10.14-intel-2.7/src/wrapt
    cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/wrapt/_wrappers.c -o build/temp.macosx-10.14-intel-2.7/src/wrapt/_wrappers.o
    cc -bundle -undefined dynamic_lookup -Wl,-F. build/temp.macosx-10.14-intel-2.7/src/wrapt/_wrappers.o -o build/lib.macosx-10.14-intel-2.7/wrapt/_wrappers.so
    running install_lib
    creating /Library/Python/2.7/site-packages/wrapt
    error: could not create '/Library/Python/2.7/site-packages/wrapt': Permission denied
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/st/r_c40wz94cnf4c426r0lvp600000gn/T/pip-install-ZMSUBx/wrapt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/st/r_c40wz94cnf4c426r0lvp600000gn/T/pip-record-fAAmbu/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/st/r_c40wz94cnf4c426r0lvp600000gn/T/pip-install-ZMSUBx/wrapt/
 

你可能感兴趣的:(python,linux)