How to install beautifulsoup into python3, when default dir is python2.7?

ERJAN picture ERJAN · Dec 29, 2015 · Viewed 61.5k times · Source

I have both Python 2.7 and Python 3.5 installed. When I type pip install beautifulsoup4 it tells me that it is already installed in python2.7/site-package directory.

But how do I install it into the python3 dir?

Answer

Alan Francis picture Alan Francis · Dec 29, 2015

I think pip3 will satisfy your needs, use the below command on the terminal:

pip3 install beautifulsoup4

See doc