Python Forum

Full Version: lxml, can't install
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I found one of my problem why some times a code snippet would run and other time it would not. I use vs express as my EDI, well it would load up with 3.5 python one time then it would load 2.7.2 another time. Well I got that fixed. It loads on 3.5.2 now all the time. Here is a new problem, I need to install  lxml, when I try this is the error I get:



   running build_ext
    building 'lxml.etree' extension
    error: Unable to find vcvarsall.bat

I googled vcvarsall.bat found it and downloaded it and put it in my system 32 file and still I get the same error. Maybe someone know what I can do about this?
Thank you Huh
How are you installing it?
Did you download 'lxml' from http://www.lfd.uci.edu/~gohlke/pythonlibs/ ?
You need wheel as posted over by sparkz_alot.
"vcvarsall.bat" you get when it try to compile stuff(lxml use C libraries),
to not setting up a compiler use wheel.
As example for python3.5 32bit: pip install lxml-3.6.4-cp35-cp35m-win32.whl
Thank you, but it looks like I can't use it, this is what I get:

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation.  All rights reserved.

C:\Users\renny and kite>pip install lxml-3.6.4-cp35-cp35m-win32.whl
Requirement 'lxml-3.6.4-cp35-cp35m-win32.whl' looks like a filename, but the fi
e does not exist
lxml-3.6.4-cp35-cp35m-win32.whl is not a supported wheel on this platform.

C:\Users\renny and kite>

I went to the web site and try all the install they had there and none worked

thanks Think

I try to install it again from the python dir. still did not work.

C:\Python3.5>pip install lxml-3.6.4-cp35-cp35m-win32.whl
Requirement 'lxml-3.6.4-cp35-cp35m-win32.whl' looks like a filename, but the fil
e does not exist
lxml-3.6.4-cp35-cp35m-win32.whl is not a supported wheel on this platform.

C:\Python3.5>
did you first download the file from the link posted by Sparkz_alot?
(Oct-31-2016, 09:44 AM)Blue Dog Wrote: [ -> ]C:\Python3.5>pip install lxml-3.6.4-cp35-cp35m-win32.whl
Requirement 'lxml-3.6.4-cp35-cp35m-win32.whl' looks like a filename, but the fil
e does not exist
lxml-3.6.4-cp35-cp35m-win32.whl is not a supported wheel on this platform.
You get this error message if wheel(.whl) file is not in folder C:\Python3.5.
So download and move wheel(lxml-3.6.4-cp35-cp35m-win32.whl) file into C:\Python3.5 folder.
Are you using the right file?
For a 32 bit Windows, you want the "lxml-3.6.4-cp35-cp35m-win32.whl" file for Python 3.5
For a 64 bit Windows, you want the "lxml-3.6.4-cp35-cp35m-win_amd64.whl" file for Python 3.5

Typically, when you click on the file name, it will download it to your "Downloads" directory
Next you have two choices (done in the terminal):
1) navigate to the downloads directory (or whatever directory you downloaded to)
  a) cd c:\users\user_name\downloads  (or other directory)
  b) pip install file_name

2) from where ever you are, use the full file location
  a) pip install c:\users\user_name\downloads\file_name

That should solve your problem
yes I did it all
C:\Python3.5>pip install lxml-3.6.4-cp35-cp35m-win_amd64.whl
Processing c:\python3.5\lxml-3.6.4-cp35-cp35m-win_amd64.whl
Installing collected packages: lxml
Successfully installed lxml-3.6.4

C:\Python3.5>
Thank you all for very good help