Closed althonos closed 7 years ago
As Tom discovered that setting STATICBUILD=true
before calling pip would work with a computer with a C Compiler installed on it. Maybe (that's just an idea) changing values in os.environ in setup.py before calling the setup function will do the trick.
That might work. However, I would be happy to close the issue if we just mention in the documentation that, for Windows, lxml may have to be installed either using STATICBUILD=true
or by just downloading the unofficial windows binaries.
Well, if the solution if just to add os.environ['STATICBUILD'] = 'true'
at the beginning of setup.py, I think that would be easier for the users. But someone need to test that works all right.
True, I could set up an AppVeyor windows testing enviroment to test the package.
I think I have a straight forward way of getting to lxml to work on Windows. The lxml windows binaries are not available on the most recent version of lxml on PyPi. If we make sure the lxml version being installed is version lxml==3.6.0 it should install fine though.
@althonos: Can you see a problem with using this version of lxml?
Nope, i don't think I'm using the most advanced features in lxml :)
So... I have updated the setup so that the following version of lxml is installed:
Windows: lxml==3.6.0 Linux/Mac: Latest version (lxml==3.6.4)
This is because:
lxml==3.6.4 has the binaries for Linux (but not windows) lxml==3.6.0 has the binaries for Windows (but not Linux)
Unfortunately there are no binaries on PyPi for Windows for >= python 3.5. In this case, lxml has to be either built from source or installed using the unofficial binaries.
Anyway.... I am going to close this issue now, as I do not think we can do much more
Help, I installed LXML and now im getting the following error: from .. import etree ImportError: cannot import name etree
Please assist
Originally opened by @Tomnl on althonos/mzml2isa:
Tom: When installing mzml2isa on windows lxml has to be installed in a bit of strange way so is failing with pip install. The installation works fine if you first install lxml using the following command (takes a while though and requires 'Microsoft Visual C++' ):
set STATICBUILD=true && pip install lxml
Alternatively, lxml can be installed from the unofficial binaries , (probably the easiest approach)
More information: http://stackoverflow.com/questions/20460890/lxml-install-on-windows-7-using-pip-and-python-2-7 http://stackoverflow.com/questions/19548011/cannot-install-lxml-on-mac-os-x-10-9