我可以在没有/usr/local 等权限的情况下使用 setuptools [英] Can I use setuptools without permissions to /usr/local etc

查看:57
本文介绍了我可以在没有/usr/local 等权限的情况下使用 setuptools的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用一些软件包(即 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆