I am trying to install the latest Beautiful Soup on Mac 10.11.3. Whenever I run pip install beautifulsoup4
the terminal defaults to installing bs4 for python 2.7 not 3.5. How do I install Beautiful Soup for Python 3.5 not 2.7?
Asked
Active
Viewed 1,123 times
-4

Ahmad Nassar
- 1
- 3
-
@wilbur Don't make trivial edits to closed posts. It will push them to reopen queue and add a burden to the reviewers. If the post is closed, allow the OP to edit. Regards – Bhargav Rao Mar 02 '16 at 21:07
-
@BhargavRao ah of course, my mistake! I just looked at the answers and saw that people were having a hard time seeing the `pip install` line. I'll keep that in mind in the future, sorry to have inconvenienced y'all – wpercy Mar 02 '16 at 21:08
-
@wilbur Not a problem when you do it for the first time. Good that you learned it early. – Bhargav Rao Mar 02 '16 at 21:10
1 Answers
0
Assuming you have a python3
binary on your system
python3 -m pip install beautifulsoup4

OneCricketeer
- 179,855
- 19
- 132
- 245
-
-
Good to know. You could also make a python3 virtualenv using the same `python3 -m` command. The "-m" means "module". – OneCricketeer Mar 02 '16 at 21:24
-
Did you install python 3.5 ? If not then download 3.5 then go to terminal of python 3.5 the try to install it. Most probably you are on python 2.7 terminal. – Farhan Ahmed May 09 '20 at 19:57
-
@FarhanAhmed I would advise always using latest Python, specifically miniconda. – OneCricketeer May 11 '20 at 20:16