1

I have looked various posts about python not getting the installed library. I tried using python -m pip install PyPDF2 to get this library installed but no luck. enter image description here

Edit: site packages enter image description here

17
  • other modules have worked just fine? Commented Oct 10, 2018 at 1:31
  • Anything preinstalled with ArcGIS works fine. Commented Oct 10, 2018 at 1:33
  • Possible duplicate of How do I install pyPDF2 module using windows? Commented Oct 10, 2018 at 1:35
  • It could be a python path problem - try closing your C:\Python27 term and open it up again. Commented Oct 10, 2018 at 1:36
  • also what does this show: import site; site.getsitepackages() Commented Oct 10, 2018 at 1:38

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.