gpt4 book ai didi

python - 在 ubuntu 中安装 imutils

转载 作者:太空狗 更新时间:2023-10-29 23:57:58 27 4
gpt4 key购买 nike

我无法安装 imutils在 ubuntu 中使用命令行。我使用了“pip install imutils”但它显示错误:

error: could not create '/usr/local/lib/python2.7/dist-packages/imutils': Permission denied

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_amorthyo/imutils/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Beko63-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_amorthyo/imutils
Storing debug log for failure in /home/amorthyo/.pip/pip.log

请问有人能帮忙吗????

最佳答案

您的用户无权写入该位置。 您不需要以 root 身份运行 pip

试试这个:

pip install --user imutils

并将您的本地站点包目录添加到 PYTHONPATH - 因为您说您在 Ubuntu 上,所以这很可能位于 ~/.local/lib/python2.7/site-packages。其他读者应该检查 python -m site 的输出以找到用户站点目录并查看它是否已启用。

关于python - 在 ubuntu 中安装 imutils,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36579781/

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