python - 在 ubuntu 中安装 imutils

标签 python ubuntu

我无法安装 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/

相关文章:

python - 检查字符串列表中的字符是否是另一个字符串列表中的字符的子集

ubuntu - omn​​et++ 中的 TKenv 无法运行

linux - Ubuntu 14.04 CUDA 8.0 未满足的依赖关系

python - 我怎样才能阻止敌人重叠pygame

python - 如何设置高水位线以阻止 pyzmq 中被淹没的收件人?

python - 如何解决 Django 中的 "TypeError at/post/new/"

python - Print 不使用临时 __str__() 或 __repr__() 方法

ubuntu - 在没有外星人的情况下将rpm转换为deb?

PyCharm 中的 Python 错误消息 : Unable to attach to shared memory segment

mysql - 错误代码 : 1148. 此 MySQL 版本不允许使用的命令