Skip to content Skip to sidebar Skip to footer

Installing Beautifulsoup4 Via Pip Produces An Import Error For Python 3.5

I'm trying to install beautifulsoup4 for Python 3.5, however, I've made it to when I call 'import bs4' to test in the Python 3.5.2 shell, I receive the error below: Traceback (mos

Solution 1:

Somehow a python2 version of of bs4 was installed into your python3 directory. In order to fix that you coult manually fix it by removing all bs4 files in C:\Users\Dan\AppData\Local\Programs\Python\Python35\lib\ (the bs4__init__.py file and also the bs4 subdirectory)

If you now do a pip install bs4 then pip thinks it has bs4 already installed so you need to do this:

pip install bs4 --ignore-installed

Post a Comment for "Installing Beautifulsoup4 Via Pip Produces An Import Error For Python 3.5"