0

I am attempting to import PyPDF2 in my Python 3 jupyter notebook on Ubuntu 20.

I tried doing in the notebook: !{sys.executable} -m pip install PyPDF2 but that threw a No module named PyPDF2 error.

In terminal, I tried pip3 install PyPDF2

but this did not help either.

Woj
  • 449
  • 1
  • 5
  • 15
  • Did you figure out the problem? Other people seem to have the same issue: https://github.com/py-pdf/PyPDF2/issues/1480 – Martin Thoma Dec 09 '22 at 16:52

1 Answers1

0

You can run the update command to obtain the latest information about your packages.

sudo apt-get update -y

For a quick installation, use the -y flag with the install command.

sudo apt-get install -y python-pypdf2

Reference Site:

https://zoomadmin.com/HowToInstall/UbuntuPackage/python-pypdf2

You can look at this thread where other members have discussed this in length. Here is the link

  • This works if I run Python in terminal, but not in Jupyter Notebook – Woj Sep 25 '21 at 01:59
  • So here are the things that I would like you to confirm. 1) Check if you have installed multiple python versions in your machine and the jupyter's kernel is using the other python that has been installed 2) If not then just go and add the path of the desired python to the system variables. 3) If you want to create a different kernel that uses the python you want then here is the code: ```python -m ipykernel install --user --name --display-name "Anaconda "``` – MURTUZA BORIWALA Sep 25 '21 at 06:27