[Tutor] Probably a silly question: how to install lxml?

Steven D'Aprano steve at pearwood.info
Wed Jul 5 21:51:12 EDT 2017

On Wed, Jul 05, 2017 at 11:42:45AM -0700, Mark at information27.com wrote:

> On Windows7, SP1, 64-bit, I installed Python 3.6.1.

Are you positive this is the only Python installed?

What does 

python -c "import sys; print(sys.version)"


> Tried to run the Python pgm, and it said ModuleNotFoundError: No module 
> named 'lxml'
> Ran "python -m pip install --upgrade lxml"
> It looked like it worked, even with several red error messages at the end.

*scratches head*

I dunno, to me it sounds like it *didn't* work, not if it is printing 
red error messages at the end. What do they say?

My guess is that you need Administrator privileges to install the 
packages. Or perhaps to tell pip to install as site packages in your 
home directory, but I'm not sure how to do that.

> Tried to run the Python pgm again, and it said the same error: 
> ModuleNotFoundError: No module named 'lxml'
> Can ya' tell me?...  How to get past this step?
> Thanks very much.


More information about the Tutor mailing list