How do I install pyPDF2 module using windows?
To install setup.py files under Windows you can choose this way with the command line:
- hit windows key
- type cmd
- excute the command line (black window)
- type
cd C:\Users\User\Downloads\pyPDF2
to go into the directory where thesetup.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 - type
C:\python27\python.exe setup.py install
I use Python2.7 here. UseC:\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:
- create a shortcut to
setup.py
- 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) 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- click OK to save the modifications to the setup.py - shortcut
- 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
"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
Pandas - Drop Last Column of Dataframe
Conditional Row Read of CSV in Pandas
How to Find the Shortest Word in a List in Python
Conversion of String to Upper Case Without Inbuilt Methods
Replacing Values in a Dataframe for Given Indices
Python/Regex - How to Extract Date from Filename Using Regular Expression
Discord.Py Show Who Invited a User
Convert String to Python Class Object
Python Pandas: Nameerror: Name Is Not Defined
Pandas: Calculate Total Percent Difference Between Two Data Frames
How to Test Multiple Variables for Equality Against a Single Value
Paramiko Capturing Command Output
Selenium - Iterating Through Groups of Elements - Python
Suppress Stdout/Stderr Print from Python Functions
Python: Printing Horizontally Rather Than Current Default Printing
Pyside - Pyqt:How to Make Set Qtablewidget Column Width as Proportion of the Available Space
Subtract One Dataframe from Another Excluding the First Column Pandas
Valueerror: Feature_Names Mismatch: in Xgboost in the Predict() Function