Python:安装鸡蛋时的权限问题

时间:2010-11-08 15:29:06

标签: python setuptools egg distribute

尝试使用South在网站范围内安装easy_install。但是我有许可问题:

drwxr-x---   2 root root   4096 Nov  8 10:23 South-0.7.2-py2.6.egg-info

然后我尝试使用pip进行安装,但收到的结果相同。

我假设我可以通过更改权限来解决这个问题。但是,我在安装过程中做错了什么?或者包装有问题吗?

评论的答案

  

iddqd :请发送输出。 sudo pip install -e hg + http://bitbucket.org/andrewgodwin/south /

结果如下:

$ sudo pip-python install -e hg+http://bitbucket.org/andrewgodwin/south/
--editable=hg+http://bitbucket.org/andrewgodwin/south/ is not the right format; it must have #egg=Package

1 个答案:

答案 0 :(得分:6)

可能是您的用户和/或root有一个特定的umask,它会创建具有0027等权限的文件。

% umask
027
% sudo touch /tmp/foo
% ls -l /tmp/foo
-rw-r-----  1 root  wheel  0 Nov  8 08:19 /tmp/foo
% umask 002
% touch /tmp/bar
% ls -al /tmp/bar
-rw-r--r--  1 root  wheel  0 Nov  8 08:23 /tmp/bar