Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named 'lxml' Windows 8.1

Everyone's code online refers to sudo apt-get #whatever# but windows doesn't have that feature. I heard of something called Powershell but I opened it and have no idea what it is.

I just want to get a simple environment going and lxml so I could scrape from websites.

like image 890
Homerdough Avatar asked Nov 20 '15 04:11

Homerdough


2 Answers

Go to the regular command prompt and try pip install lxml. If that doesn't work, remove and reinstall python. You'll get a list of check marks during installation, make sure you check pip and try pip install lxml again afterwards.

pip stands for pip installs packages, and it can install some useful python packages for you.

like image 131
rofls Avatar answered Oct 08 '22 04:10

rofls


Try downloading the lxml package from here, then, on the command prompt, type in:

pip install path/to/lxml_package_file

For example, after downloading lxml‑3.5.0‑cp35‑none‑win_amd64.whl since I have Python 3.5 on a 64-bit Windows box, I type in the following commands:

cd path/to/lxml_file
pip install lxml‑3.5.0‑cp35‑none‑win_amd64.whl

Then it should install fine.

like image 30
Isxek Avatar answered Oct 08 '22 03:10

Isxek