I use Spyder, with Python 2.7, on a windows 10. I was able to install the PyPDF2 package with a conda command from my prompt. I said installation complete. Yet, If I try to run a simple import command:
import PyPDF2
I get the error:
ImportError: No module named PyPDF2
How can I fix this?
type cmd. excute the command line (black window) type cd C:\Users\User\Downloads\pyPDF2 to go into the directory where the setup.py is (this is mine if I downloaded it) The path can be copied from the explorer window. type dir now you should see the name setup.py in the listing of all contents.
Use PyPDF2. I've been using it in Python 3 (v3. 5.2 to be precise), and it works quite well. Here's a simple command that you can use to install PyPDF2.
PyPDF2 is a pure Python PDF library capable of: extracting document information (title, author, …) splitting documents page by page. merging documents page by page. cropping pages.
In my case, I was trying to import 'pyPdf2' instead of 'PyPDF2'. Observe the case.
import PyPDF2
is correct.
If you use python3 maybe
apt-get install python3-pypdf2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With