2012-01-17 183 views
2

這是我requirements.txt DOC問題PIP安裝

1 BeautifulSoup==3.2.0 
    2 -e git://github.com/django/[email protected]#egg=Django-dev 

我得到一個錯誤,當我運行sudo pip install --upgrade -r requirements.txt

Obtaining Django from git+git://github.com/django/[email protected]#egg=Django-dev (from -r requirements.txt (line 2)) 
Command /usr/local/bin/git config remote.origin.url failed with error code 1 
Storing complete log in /Users/nai/.pip/pip.log` 

我運行的Git 1.7.8.3。

我創建使用mkvirtualenv --no-site-packages <name>

我使用的是Mac OS X Lion的我的virtualenv。

我已閱讀此https://github.com/pypa/pip/issues/58#issuecomment-1337640但我不確定我應該採取哪些措施來糾正問題?

回答

2

有一個在你鏈接的線程解決方法:更改線路PIP/VCS/git.py的114-118閱讀:

def get_url(self, location):                       
url = call_subprocess(                                  
    [self.cmd, 'config', 'remote.origin.url'],                            
    show_stdout=False, cwd=location, raise_on_returncode=False)                        
return (url or '').strip() 
+0

我已經試過了。對不起沒有提到。 – super9 2012-01-17 14:57:50

+0

這應該打印出一條消息,但仍能正確更新所有內容。你確定git命令失敗了嗎? – jknupp 2012-01-17 15:34:25

+0

我現在正在做的是刷新我的virtualenvwrapper重裝。似乎現在正在工作.. – super9 2012-01-17 15:40:24