2012-02-19 86 views
2

我試圖把Django項目在Heroku按照這裏列出的說明:http://devcenter.heroku.com/articles/djangoHeroku的設置 - PIP無法找到/安裝依賴

但是,每當我得到這一行PIP失敗: git push heroku master

-----> Heroku receiving push 
-----> Python/Django app detected 
-----> Preparing virtualenv version 1.7 
    New python executable in ./bin/python 
    Installing  distribute...........................................................................................................................................................................................done. 
    Installing pip...............done. 
-----> Activating virtualenv 
-----> Installing dependencies using pip version 1.0.2 
    Downloading/unpacking Brlapi==0.5.5 (from -r requirements.txt (line 1)) 
    Could not find any downloads that satisfy the requirement Brlapi==0.5.5 (from -r  requirements.txt (line 1)) 
    No distributions at all found for Brlapi==0.5.5 (from -r requirements.txt (line 1)) 
.  Storing complete log in /app/.pip/pip.log 
!  Heroku push rejected, failed to compile Python/django app 

To [email protected]:fierce-stone-5846.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:fierce-stone-5846.git 

問題似乎是pip無法找到依賴關係。我到處搜索了一個答案,所以你可以提供的任何建議都是有用的。如果需要的話,你可以用requirements.txt文件在這裏找到一起的項目:https://github.com/Ballaw/Twithub

回答

1

從這個stackoverflow question你可以這樣做:

virtualenv --no-site-packages venv 

的--no-站點包選項防止虛擬環境從可以訪問系統上的所有軟件包。

+0

這是答案,但它有另一個問題。我認爲這與PYTHONPATH有關。每當我嘗試在heroku上運行應用程序時,日誌如下所示: – ballaw 2012-02-20 05:29:29