gpt4 book ai didi

python - 如何在 OSX 上安装 pyperclip

转载 作者:行者123 更新时间:2023-11-30 22:34:21 25 4
gpt4 key购买 nike

当我使用命令“pip install pyperclip”时,它给了我这个错误

creating /Library/Python/2.7/site-packages/pyperclip
error: could not create '/Library/Python/2.7/site-packages/pyperclip': Permission denied

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ts/tdt25dd52pg6ymt1tc1djd540000gn/T/pip-build-QWGKB1/pyperclip/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/ts/tdt25dd52pg6ymt1tc1djd540000gn/T/pip-sfvxg3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ts/tdt25dd52pg6ymt1tc1djd540000gn/T/pip-build-QWGKB1/pyperclip/

为什么我没有权限。

最佳答案

尝试一下

sudo pip install pyperclip

现在,如果它抛出一些访问拒绝错误,请尝试以下操作:

sudo pip -H install pyperclip

关于python - 如何在 OSX 上安装 pyperclip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44857219/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com