Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named pyPdf #11

Closed
betesh opened this issue May 1, 2014 · 2 comments
Closed

ImportError: No module named pyPdf #11

betesh opened this issue May 1, 2014 · 2 comments
Labels

Comments

@betesh
Copy link

betesh commented May 1, 2014

I think pyPdf changed its name to pyPdf2. See http://mstamy2.github.io/PyPDF2/

Downloading/unpacking pdfmerge
  Downloading pdfmerge-0.0.4.tar.gz
  Running setup.py (path:/tmp/pip_build_XXX/pdfmerge/setup.py) egg_info for package pdfmerge
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_XXX/pdfmerge/setup.py", line 11, in <module>
        import pdfmerge
      File "pdfmerge.py", line 14, in <module>
        from pyPdf import PdfFileWriter, PdfFileReader
    ImportError: No module named pyPdf
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_XXX/pdfmerge/setup.py", line 11, in <module>

    import pdfmerge

  File "pdfmerge.py", line 14, in <module>

    from pyPdf import PdfFileWriter, PdfFileReader

ImportError: No module named pyPdf

So I tried installed pyPdf manually, which required a few dangerous flags:

$ pip install pyPdf --user --allow-external pyPdf --allow-unverified PyPdf

This got me a little further:

  File "/tmp/pip_build_XXX/pdfmerge/setup.py", line 36, in <module>
    'install_requires': get_deps('requirements.txt'),
  File "/tmp/pip_build_XXX/pdfmerge/setup.py", line 19, in get_deps
    for line in open(path):
IOError: [Errno 2] No such file or directory: 'requirements.txt'

And at this point, I'm totally lost.

@metaist metaist closed this as completed in 8be13f0 May 2, 2014
@metaist metaist added the bug label May 2, 2014
metaist added a commit that referenced this issue May 2, 2014
@metaist
Copy link
Owner

metaist commented May 2, 2014

Took me a bit, but I think this is finally resolved.

@betesh
Copy link
Author

betesh commented May 2, 2014

I can confirm this works--uninstalled pip and deleted ~/.pip and ~/.local/python*, then re-installed pip just to be absolutely sure I was working with a clean environment. After that, pip install pdfmerge --user worked on the first try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants