Issue
In the notebook machine I was using Spyder3 without any problem until install jupyter-notebook.
When run spyder3 from command line, the next message appear:
File "/usr/lib/python2.7/dist-packages/bs4/builder/_html5lib.py", line 70, in class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
after some search try the proposed solutions on:
https://github.com/spyder-ide/spyder/issues/4309
https://bugs.launchpad.net/beautifulsoup/+bug/1603299
beautifulsoup, html5lib: module object has no attribute _base
try:
sudo pip install --upgrade beautifulsoup4
sudo pip install --upgrade html5lib
sudo pip install spry
Also reinstall:
sudo pip install --upgrade spyder
One year ago in the desktop machine i had the same problem, i fixed changing some python code but now dont remember how was fixed it.
Also downgrade the html5lib version to the same version of my desktop computer:
sudo -H pip install html5lib==0.9999999
and beautifulsoup4
sudo -H pip install beautifulsoup4==4.4.1
python
import html5lib
html5lib.version
u'0.9999999'
import bs4
bs4.version
'4.4.1'
But nothing happen.
The notebook machine have installed:
Ubuntu 16.04 - 32 bit python 2.7, 3 and 3.5
Any help will be welcome
Solution
I found the solution here: https://github.com/Sigil-Ebook/Sigil/issues/316
open the file: sudo mousepad /usr/lib/python3/dist-packages/bs4/builder/_html5lib.py
and change :
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
with
class TreeBuilderForHtml5lib(html5lib.treebuilders.base.TreeBuilder):
and
class Element(html5lib.treebuilders._base.Node):
with
class Element(html5lib.treebuilders.base.Node):
Answered By - user2232395
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.