2014-02-24 39 views
4

我嘗試安裝這個包...我無法安裝pyPDF包都沒有分佈發現pyPdf

$ pip search pyPdf  
PyPDFLite     - Simple PDF Writer. 
pypdfocr     - Converts a scanned PDF into an OCR'ed pdf using Tesseract-OCR and Ghostscript 
pyPdf      - PDF toolkit 
PyPDF2     - PDF toolkit 
pyjon.reports    - Pyjon.Reports is a module bridging z3c.rml, genshi and pypdf together to provide a simple mean of creating templated pdf documents in python. 
pypdf2xml     - A reimplementation of pdftoxml in Python, using pdfMiner. Handles unicode characters better. 
pypdflib     - Pango Cairo based Python PDF Library 
pypdf2table    - PDF table extraction tool 

而且我運行安裝包

$ pip install pyPdf     
Downloading/unpacking pyPdf 
    Could not find any downloads that satisfy the requirement pyPdf 
    Some externally hosted files were ignored (use --allow-external pyPdf to allow). 
Cleaning up... 
No distributions at all found for pyPdf 
Storing debug log for failure in /tmp/tmpgEc3B 

請告訴我這個問題?

回答

6

Specipy --allow-external--allow-unverified選項:

pip install --allow-external pyPdf --allow-unverified pyPdf pyPdf 

指定--allow-unverified意味着--allow-external;可以省略。

pip install --allow-unverified pyPdf pyPdf 
+0

我跑,你回答的命令。但是我有這個錯誤。 ConnectionError:HTTPConnectionPool(host ='stompstompstomp.com',port = 80):最大重試次數超過url:/ pyPdf /(由引起:[Errno -2]名稱或服務未知) '' 我在考慮改變與PyPdf有依賴關係的包。就像在我的項目xhtml2pdf或django-xhtml2pdf中一樣。 你可以建議其他軟件包做這個功能嗎? 感謝您的幫助! –

+0

@LucasSimon,'pip install --allow-unverified ..'適用於我。參見[我剛錄製的截屏](https://asciinema.org/a/7845) – falsetru

2

pyPdf不再更新,您可以檢查它在其網站上here

所以你最好用其他包裝像pyPdf2。如果您堅持使用pyPdf,你可以嘗試falsetru發佈

0

如果你使用Debian/Ubuntu中,你可以使用標準庫安裝相應的包裝方法:

$sudo apt-get update 
$sudo apt-get install python-pypdf