2014-02-24 40 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