Skip to content

Commit

Permalink
fix: lxml not installed (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
domainname authored Oct 4, 2022
1 parent 245e51a commit d90a69c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

然后安装 lxml :

command -v pip || sudo easy_install pip
sudo pip install lxml
command -v pip3 || sudo easy_install pip3
sudo pip3 install lxml

## 简介

Expand Down
3 changes: 2 additions & 1 deletion cndict/oxford.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import re
import subprocess
import sys
import sysconfig
import urllib
import urllib.parse
from distutils.version import StrictVersion
Expand All @@ -14,7 +15,7 @@

_lxml_installed = True
try:
sys.path.append('/usr/local/lib/python2.7/site-packages')
sys.path.append(sysconfig.get_paths()["purelib"])
from lxml import etree
except ImportError:
_lxml_installed = False
Expand Down

0 comments on commit d90a69c

Please sign in to comment.