How to Install Pypdf2 Module Using Windows

How do I install pyPDF2 module using windows?

To install setup.py files under Windows you can choose this way with the command line:

  1. hit windows key
  2. type cmd
  3. excute the command line (black window)
  4. 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.
  5. type dir now you should see the name setup.py in the listing of all contents
  6. type C:\python27\python.exe setup.py install I use Python2.7 here. Use C:\python33\python.exe setup.py install for python 3.3 and so on. You can follow these instructions now if you wish: http://docs.python.org/2/install/index.html

Another way, that does not show when there are problems, is:

  1. create a shortcut to setup.py
  2. open the properties of the shortcut. There should be a path like this: C:\Users\User\Downloads\pyPDF2\setup.py (this is where my setup.py is)
  3. you modify that path in the following way:

    "C:\Users\User\Downloads\pyPDF2\setup.py" install

    The " are important if you have white spaces in the path name

  4. click OK to save the modifications to the setup.py - shortcut
  5. double-click the setup.py - shortcut.

In all cases you may need to restart your python to be able to import the module.

When you do this feel free to post your solution also with pictures for other newbies looking for it.

Cannot install PyPdf 2 module

It appears the README file for PyPDF2 is incorrect. It suggests that

import pyPdf

should work, but it doesn't. This new module is imported as

import PyPDF2

(as suggested by the document structure on github, and after verifying myself).

For convenience, when e.g. working with older code, you can of course do

import PyPDF2 as pyPdf

How to install PyPdf2 in PyCharm (Windows-64 bits)

u can resolve this..
Go to command prompt and type pip install PyPDF2
Also go to pycharm and open "python packages" search for PyPDF2 and install it..
Hopefully it should work..
It worked for me

ImportError: No module name PyPdf2 python 2.7.13 on Windows arcgis subdirectory

It looks like your PyPDF2 module is install inside the arcgis sub-directory
If you add this to the top of your script that should do it

import sys
sys.path.append('c:\python27\argis10.5\lib\site-packages')
import PyPDF2

If you need you can also look into modifying your PYTHONPATH

Edit adding on to Jeff's answer:
I added a new pythonpath variable in environmental variables that I was missing to direct the python console to C:\Python27\ArcGIS10.5\Lib\site-packages
enter image description here

"no module named PyPDF2" error

If you use python3 maybe

apt-get install python3-pypdf2

ImportError No Module Named 'PyPDF2'

First of all you should install python packages via pip. Run pip install PyPDF2, that might fix it already.

Also check which interpreter is selected for your project in pycharm. If Pycharm isn't using your system python, it won't see packages installed from a normal shell.

You'll find it in the Settings -> Project: your_project -> Project Interpreter.



Related Topics



Leave a reply



Submit