我可以在没有/usr/local 等权限的情况下使用 setuptools [英] Can I use setuptools without permissions to /usr/local etc
问题描述
我想使用一些软件包(即 IPython 或 zdaemon),但我在一个系统(我的大学)上执行此操作,该系统未授予我对/usr/local、/usr/bin 或所有这些目录的权限.有办法解决吗?
I want to use some packages (i.e., IPython or zdaemon), butI am doing this on a system (my university) that does not give me permissions for /usr/local, /usr/bin, or all these directories. Is there a way around it?
推荐答案
当然,您可以使用 配置文件 指定备用安装目录,或使用 --install-dir
选项.我认为将 Python 包放入您自己的用户帐户的标准位置是 $HOME/.local/
(如果您使用的是 Python 2.6).例如,纯 Python 包将在 $HOME/.local/lib/python2.6/site-packages/
中结束.
Sure, you can use a configuration file that specifies an alternate installation directory, or use the --install-dir
option. The standard place to put Python packages in your own user account is, I think, in $HOME/.local/
(if you're using Python 2.6). So for instance, pure-Python packages will wind up in $HOME/.local/lib/python2.6/site-packages/
.
如果您的 setuptools 版本足够新,可以支持它,还可以查看 --prefix
选项.
If your version of setuptools is recent enough to support it, also have a look at the --prefix
option.
这篇关于我可以在没有/usr/local 等权限的情况下使用 setuptools的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!