Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Problem with installing PyPDF2
#1
Hello,
Here is what happens when I'm trying to install PyPDF2:
Output:
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 ?
Thanks.
Quote
#2
(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 setup.py install for PyPDF2 ... done
Successfully installed PyPDF2-1.26.0
buran and Pavel_47 like this post
Quote
#3
Worked. Thanks !
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Problem installing instaloader ledgreve 21 547 Nov-18-2019, 11:28 AM
Last Post: ledgreve
  PyPDF2 processing problem Pavel_47 5 163 Nov-12-2019, 12:35 PM
Last Post: Larz60+
  pyPDF2 nautilus columns modification AJBek 1 422 Jun-07-2019, 04:17 PM
Last Post: micseydel
  Using Pypdf2 write a string to a pdf file Pedroski55 6 2,284 Apr-11-2019, 11:10 PM
Last Post: snippsat
  Merging pdfs with PyPDF2 Pedroski55 0 630 Mar-07-2019, 11:58 PM
Last Post: Pedroski55
  PyPDF2 encrypt Truman 3 1,034 Jan-19-2019, 12:18 AM
Last Post: snippsat
  Problem installing numpy and matplotlib achondrite 1 518 Jan-16-2019, 11:43 PM
Last Post: snippsat
Photo Problem installing turtle MasterJediKnight7 16 6,025 Nov-11-2018, 10:42 AM
Last Post: MasterJediKnight7
  PyPDF2 Hanging When Trying to Open Corrupted PDF bmccollum 6 1,285 Nov-09-2018, 10:40 AM
Last Post: Larz60+
  PyPDF2 or indentation issue siten0308 3 1,201 Apr-20-2018, 09:35 PM
Last Post: siten0308

Forum Jump:


Users browsing this thread: 1 Guest(s)