【问题标题】:I can't install pyPDF package No distributions at all found for pyPdf我无法安装 pyPDF 包 没有找到 pyPdf 的发行版
【发布时间】:2014-03-26 06:32:09
【问题描述】:

我尝试安装这个包...

$ 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

有什么问题?

【问题讨论】:

    标签: python installation pip packages


    【解决方案1】:

    指定--allow-external--allow-unverified 选项:

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

    指定--allow-unverified 隐含--allow-external;可以省略。

    pip install --allow-unverified pyPdf pyPdf
    

    【讨论】:

    • 我运行你回答的命令。但我有这个错误。 ConnectionError: HTTPConnectionPool(host='stompstompstomp.com', port=80): Max retries exceeded with url: /pyPdf/ (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)' 我正在考虑更改与 PyPdf 有依赖关系的包。就像在我的项目 xhtml2pdf 或 django-xhtml2pdf 中一样。您能推荐其他具有此功能的软件包吗?感谢您的帮助!
    • @LucasSimon, pip install --allow-unverified .. 为我工作。见a screencast I just recorded
    【解决方案2】:

    pyPdf 不再更新,你可以在他们的网站here查看它

    所以你最好使用其他包,比如 pyPdf2。如果你坚持使用pyPdf,可以试试falsetru贴的方法

    【讨论】:

      【解决方案3】:

      如果你使用Debian/Ubuntu,你可以使用标准仓库安装相应的包:

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

      【讨论】:

        猜你喜欢
        • 2012-09-28
        • 2017-06-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-12-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多