2016-04-11 33 views
0

lxml'yi yüklemeye çalıştığımda aşağıdakileri alırım. C++ redistleri ve buldukları bir sürü şey indirmeyi denedim ama hiçbir şey işe yaramıyor. Ben piton sürüm 3.5.1 varPython için lxml kullanma - Windows 7 64 bit

How to install lxml on Windows

:

aşağıdaki bağlantıdan her şeyi denedik. Ben derlenmiş ikillerin takma

Microsoft Windows [Version 6.1.7601] 
Copyright (c) 2009 Microsoft Corporation. All rights reserved. 

C:\Users\daniel.bak>pip install setuptools 
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\users\daniel.bak\appdata\local\programs\python\python35-32\lib\site-packages 

C:\Users\daniel.bak>pip install lxml 
Collecting lxml 
    Using cached lxml-3.6.0.tar.gz 
Installing collected packages: lxml 
    Running setup.py install for lxml ... error 
    Complete output from command c:\users\daniel.bak\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\daniel.bak\\AppData\\Local\\Temp\\pip-build-_d7bp49n\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replac 
e('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\daniel.bak\AppData\Local\Temp\pip-4wmqb1li-record\install-record.txt --single-version-externally-managed --compile: 
    Building lxml version 3.6.0. 
    Building without Cython. 
    ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n" 
    ** make sure the development packages of libxml2 and libxslt are installed ** 

    Using build configuration of libxslt 
    running install 
    running build 
    running build_py 
    creating build 
    creating build\lib.win32-3.5 
    creating build\lib.win32-3.5\lxml 
    copying src\lxml\builder.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\cssselect.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\doctestcompare.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\ElementInclude.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\pyclasslookup.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\sax.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\usedoctest.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\_elementpath.py -> build\lib.win32-3.5\lxml 
    copying src\lxml\__init__.py -> build\lib.win32-3.5\lxml 
    creating build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\__init__.py -> build\lib.win32-3.5\lxml\includes 
    creating build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\builder.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\clean.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\defs.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\diff.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\ElementSoup.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\formfill.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\html5parser.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\soupparser.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\usedoctest.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\_diffcommand.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\_html5builder.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\_setmixin.py -> build\lib.win32-3.5\lxml\html 
    copying src\lxml\html\__init__.py -> build\lib.win32-3.5\lxml\html 
    creating build\lib.win32-3.5\lxml\isoschematron 
    copying src\lxml\isoschematron\__init__.py -> build\lib.win32-3.5\lxml\isoschematron 
    copying src\lxml\lxml.etree.h -> build\lib.win32-3.5\lxml 
    copying src\lxml\lxml.etree_api.h -> build\lib.win32-3.5\lxml 
    copying src\lxml\includes\c14n.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\config.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\relaxng.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\schematron.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\tree.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\uri.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\xinclude.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\xpath.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\xslt.pxd -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\etree_defs.h -> build\lib.win32-3.5\lxml\includes 
    copying src\lxml\includes\lxml-version.h -> build\lib.win32-3.5\lxml\includes 
    creating build\lib.win32-3.5\lxml\isoschematron\resources 
    creating build\lib.win32-3.5\lxml\isoschematron\resources\rng 
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-3.5\lxml\isoschematron\resources\rng 
    creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl 
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl 
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl 
    creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    running build_ext 
    building 'lxml.etree' extension 
    error: Unable to find vcvarsall.bat 

    ---------------------------------------- 
Command "c:\users\daniel.bak\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\daniel.bak\\AppData\\Local\\Temp\\pip-build-_d7bp49n\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file_ 
_, 'exec'))" install --record C:\Users\daniel.bak\AppData\Local\Temp\pip-4wmqb1li-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\daniel.bak\AppData\Local\Temp\pip-build-_d7bp49n\lxml\ 

bana verir: Sen derlenmiş ikillerin indirip İşte pip install

download link olduğu ile yüklediği,

C:\Users\daniel.bak>pip install "C:\Users\daniel.bak\Downloads\lxml-3.6.0-cp35-cp35m-win_amd64.whl" 
lxml-3.6.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform. 
+0

Her zaman Python kullanmıyorum, ancak Python'u kullandığımda, Anaconda dağıtımını tercih ediyorum. Paket zaten dağıtımda değilse, genellikle 'conda install ' ile kurarsınız. Ayrıca, mevcut olanlarınızı bozarak birden fazla kurulumu kolayca yönetme konusunda VirtualEnv 'https://pypi.python.org/pypi/virtualenv adresine bir göz atın. – roadrunner66

+1

https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/ – kichik

+0

64 bitlik bir python yüklemeniz var mı? Python'u komut satırından python ile başlattığınızda ilk çıktı satırı tam olarak nedir? (Örneğin benim için: Python 3.5.0 (v3.5.0: 374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64bit (AMD64)] win32 'üzerinde)? – Matthew

cevap

2

. cp27, cp34, cp35, Python sürümlerini ve win32 ve win_amd64 32 ve 64 bit paketlerini belirtir.

+0

Bunu işe alamıyorum. C: \ Users \ daniel.bak> pip install "C: \ Users \ daniel.bak \ Downloads \ lxml-3.6.0-cp35-cp35m-win_amd64.whl" lxml-3.6.0-cp35-cp35m- win_amd64.whl bu platformda desteklenen bir tekerlek değil. –

+0

python -m pip install "C: \ Users \ daniel.bak \ Downloads \ lxml-3.6.0-cp35-cp35m-win_amd64.whl" lxml-3.6.0-cp35-cp35m-win_amd64.whl – Janekmuric

+0

Yukarıdaki komutu kullanın ve python 3.5 senin PATH üzerinde ise işe yarayacak – Janekmuric

-1

Sistemimde lxml'yi urllib ile birlikte yükleme konusunda sorun yaşıyordum. Neden lxml python 3.5 için mevcut olmadığını hatırlamıyorum, urllib kendisi kullanılabilir değil, ancak bunun yerine urllib.requests ve hatırlamıyorum başka bir paket olarak kullanılabilir. Benim için en iyi çözüm bunun yerine anakconda kurmaktı. Anaconda'nın çok fazla kütüphanesi var ve python yerine büyük ölçüde çalışıyor. Tüm url kütüphanesine ve diğer birçok kütüphanenin bir kavrayışına sahiptir.

İlgili konular