-1

I am a newbie with Python and I am going around in circles over python's inability to find a mod. In jupyter notebook here is what I get:

pip install pypdf2
Requirement already satisfied: pypdf2 in c:\users\stanleydenman\appdata\local\programs\python\python311\lib\site-packages (3.0.1)
Note: you may need to restart the kernel to use updated packages.
import pypdf2
import pypdf2
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 1
----> 1 import pypdf2

ModuleNotFoundError: No module named 'pypdf2

So python acknowledges pypdf2 is installed, but cannot find it to import it? I

I have installed, and reinstalled python. I selected the option once to have environmental variables set, other times set them myself. Nothing makes a difference.

Environmental variable set as follows:

C:\Users\StanleyDenman\AppData\Local\Programs\Python\Python311\Scripts\site-packages;C:\Users\StanleyDenman\AppData\Local\Programs\Python\Python311\;C:\Users\StanleyDenman\AppData\Local\Microsoft\WindowsApps;C:\Users\StanleyDenman\AppData\Roaming\npm;C:\Users\StanleyDenman\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Tesseract-OCR;

Tried with Anaconda, cmd line, and jupyter notebook. All the same result.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241

1 Answers1

0

Try
pip list
to make sure it's installed.

ArAsH
  • 122
  • 10
  • it is there. Pip list givens me "PyPDF2 3.0.1" in the list. Still cannot import pypdf2 – Stanley Denman Jan 09 '23 at 21:50
  • Try to import it in uppercase → import PyPDF2 – ArAsH Jan 10 '23 at 19:27
  • uppercase did not help things. – Stanley Denman Jan 11 '23 at 23:17
  • 2
    I will try one more time until I look elsewhere for help. If i do a pip3 list, I get a lot of packages, including pdfminer, pyPDF2, pyrsistent, etc. Lots of packages. In a jupyter notebook, I can import all of these listed pip installed packages EXCEPT pyPDF2. If this is too advanced for this group, can someone please refer me to a forum where I might get some help? – Stanley Denman Jan 12 '23 at 19:14