2015-12-11 51 views
1

我試圖安裝python包pmock。 使用下面的命令:無法使用pip搜索python包pmock

sudo pip install pmock 

不過,我得到以下錯誤:

Collecting pmock 
    Getting page https://pypi.python.org/simple/pmock/ 

    Could not find a version that satisfies the requirement pmock (from versions:) 
    Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pmock to allow). 
Cleaning up... 
No matching distribution found for pmock 

什麼是使用pip安裝Python包的正確方法是什麼?

回答

1

這是通過PIP installtions未來的常見問題之一,一般的Django通過requirements.txt。基本的解決方案設置環境是讓外部未經驗證選項太

嘗試外部安裝時也拋出這個錯誤這樣託管文件:

sudo pip install pmock --allow-external pmock --allow-unverified pmock 
+1

謝謝,它有幫助。 :) – mohit