Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Problem with installing PyPDF2
Here is what happens when I'm trying to install PyPDF2:
sudo pip3 install PyPDF2 Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'
Any suggestions ?
(Nov-10-2019, 01:52 PM)Pavel_47 Wrote: File "/usr/bin/pip3", line 9, in <module>
Bug report
Quote:User runs the system wrapper from /usr/bin/pip3 which is from the OS-supplied pip 8.
This wrapper expects to see pip 8, but it doesn't because user site takes priority over system site.
So it can use the old pip-8 that's placed in /usr/bin/pip3,newest version is now pip-19.3.1.
A fix that is in the link.
sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall

Or pyenv Simple Python Version Management then is never sudo or pip3 and it use internal pip version from Python.
Then it work like this.
# Check pip see that it point to Python version not OS
tom@tom:~$ pip -V
pip 19.3.1 from /home/tom/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip (python 3.7)

# Install
tom@tom:~$ pip install PyPDF2
Collecting PyPDF2
  Downloading .....
Installing collected packages: PyPDF2
  Running install for PyPDF2 ... done
Successfully installed PyPDF2-1.26.0
Pavel_47 and buran like this post
Worked. Thanks !

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Problem Installing rasterio gw1500se 1 204 Mar-24-2020, 06:28 PM
Last Post: gw1500se
  Problem installing library thunderspeed 2 320 Mar-22-2020, 11:04 PM
Last Post: thunderspeed
  Please help: problem installing/importing langdetect module in Jupyter Notebook ledgreve 3 1,189 Dec-30-2019, 08:17 AM
Last Post: LeanbridgeTech
  Problem installing instaloader ledgreve 21 2,181 Nov-18-2019, 11:28 AM
Last Post: ledgreve
  PyPDF2 processing problem Pavel_47 5 1,452 Nov-12-2019, 12:35 PM
Last Post: Larz60+
  pyPDF2 nautilus columns modification AJBek 1 672 Jun-07-2019, 04:17 PM
Last Post: micseydel
  Using Pypdf2 write a string to a pdf file Pedroski55 6 5,837 Apr-11-2019, 11:10 PM
Last Post: snippsat
  Merging pdfs with PyPDF2 Pedroski55 0 1,160 Mar-07-2019, 11:58 PM
Last Post: Pedroski55
  PyPDF2 encrypt Truman 3 1,988 Jan-19-2019, 12:18 AM
Last Post: snippsat
  Problem installing numpy and matplotlib achondrite 1 829 Jan-16-2019, 11:43 PM
Last Post: snippsat

Forum Jump:

Users browsing this thread: 1 Guest(s)