MestreLion / humblebundle

API for managing Humble Bundle games library
GNU General Public License v3.0
209 stars 38 forks source link

Error "ImportError: No module named lxml" #18

Closed TheSandman86 closed 8 years ago

TheSandman86 commented 8 years ago

Hello, i've cloned the git repo and follow the instructions to install, i have installed all the dependencies, but when i try to run the app i got this error: Traceback (most recent call last): File "/home/mauricio/.local/bin/humblebundle", line 52, in import httpbot File "/home/mauricio/.git/humblebundle/httpbot.py", line 30, in from lxml import html ImportError: No module named lxml

Thanks in advance.

MestreLion commented 8 years ago

Are you sure you have lxml correctly installed? If you're using Python 3 as your default python you may have to install the Python3 version of all dependencies (I'm not sure if this project will run flawlessly under Python 3)

TheSandman86 commented 8 years ago

Hi, im using Python 2.7:

$python Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2

$ls -l /usr/bin/python lrwxrwxrwx 1 root root 9 jun 13 13:46 /usr/bin/python -> python2.7

and all the packages are for that version.

MestreLion commented 8 years ago

Care to double-check if you have lxml installed? On Debian/Ubuntu distros, you can check with dpkg -l python-lxml, and you can install with sudo apt-get install python-lxml.

TheSandman86 commented 8 years ago

Yes, it is installed: python-lxml/xenial,now 3.5.0-1build1 amd64 [installed] pythonic binding for the libxml2 and libxslt libraries

I'm in Ubuntu 16.04.

MestreLion commented 8 years ago

That's really, really weird. Maybe package or module names changed in Ubuntu 16.04? To isolate the problem, care to create a test with just the line import lxml, save it like bug.py, and try to run it with python bug.py and go from there?

TheSandman86 commented 8 years ago

Hi, it is weird, i tried what you told me and this is the result:

$python bug.py Traceback (most recent call last): File "bug.py", line 1, in import lxml ImportError: No module named lxml

TheSandman86 commented 8 years ago

I've searched lxml in my pc and this is what i've found: $locate lxml /home/mauricio/.local/lib/python2.7/site-packages/bs4/builder/_lxml.py /home/mauricio/.local/lib/python2.7/site-packages/bs4/builder/_lxml.pyc /home/mauricio/.local/lib/python2.7/site-packages/bs4/tests/test_lxml.py /home/mauricio/.local/lib/python2.7/site-packages/bs4/tests/test_lxml.pyc /home/mauricio/.local/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py /home/mauricio/.local/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.pyc /home/mauricio/.local/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py /home/mauricio/.local/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.pyc /usr/bin/dh_installxmlcatalogs /usr/share/man/man1/dh_installxmlcatalogs.1.gz

MestreLion commented 8 years ago

I'm unable to troubleshoot your lxml install, but as your test file shows this is clearly not a bug in this project.