Ich habe versucht, ein Modul mit dem Namen tushare zu installieren, ich habe versucht, drei Methoden: pip, easy_install und installieren setup.py, sie haben alle den gleichen Fehler:Python-Modul Installationsfehler
ImportError: No module named lxml.html
pip:
C:\WINDOWS\system32>pip install tushare
Collecting tushare
Using cached tushare-0.6.8.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\endeav~1\appdata\local\temp\pip-build-pkbgde\tushare\setup.py", line 4, in <module>
import tushare
File "tushare\__init__.py", line 6, in <module>
from tushare.stock.trading import (get_hist_data, get_tick_data,
File "tushare\stock\trading.py", line 13, in <module>
import lxml.html
ImportError: No module named lxml.html
easy_install:
C:\WINDOWS\system32>easy_install tushare
Searching for tushare
Reading https://pypi.python.org/simple/tushare/
Downloading https://pypi.python.org/packages/0a/ca/ad9eeed1c285c58d115a0dd82734e5375abf1b6e510c7c24f2f8de921c75/tushare-0.6.8.tar.gz#md5=7626d97088d93d99c1a6ece80302d617
Best match: tushare 0.6.8
Processing tushare-0.6.8.tar.gz
Writing c:\users\endeav~1\appdata\local\temp\easy_install-iisas7\tushare-0.6.8\setup.cfg
Running tushare-0.6.8\setup.py -q bdist_egg --dist-dir c:\users\endeav~1\appdata\local\temp\easy_install-iisas7\tushare-0.6.8\egg-dist-tmp-dakavz
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
.......
File "c:\users\endeav~1\appdata\local\temp\easy_install-iisas7\tushare-0.6.8\tushare\stock\trading.py", line 13, in <module>
ImportError: No module named lxml.html
setup.py installieren
Ich habe Python 2.7 und 3.0 auf Windows 10 installiert, arbeitete an IDLE, keine IDE, wie kann ich es beheben?
Dann installierte ich lxml:
C:\WINDOWS\system32>pip install lxml
Fehler:
** make sure the development packages of libxml2 and libxslt are installed **
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
ich nicht pip libxml2 und libxslt installieren nutzen könnten.
C:\WINDOWS\system32>pip install libxml2
Collecting libxml2
Could not find a version that satisfies the requirement libxml2 (from versions:)
No matching distribution found for libxml2
C:\WINDOWS\system32>pip install libxslt
Collecting libxslt
Could not find a version that satisfies the requirement libxslt (from versions:)
No matching distribution found for libxslt
Was könnte ich als nächstes tun?
Haben Sie den Fehler über libxml2 und libxslt während der Installation von lxml erhalten oder wenn Sie nach der Installation von lxml versucht haben, tushare zu installieren? – Steampunkery
lxml von [hier] (http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml) abrufen, dann das Dateiattribut von .zip zu .whl ändern. .'C: \ WINDOWS \ system32> CD C: \ Python27 \ Skripte ___________________ C: \ Python27 \ Skripte> pip.exe installieren C: \ Benutzer \ Endeavour \ Desktop \ lxml-3.6.4-cp27-cp27m-win_amd64 .whl Verarbeitung c: \ users \ Bestreben \ Desktop \ lxml-3.6.4-CP27-cp27m-win_amd64.whl Installation gesammelte Pakete: lxml erfolgreich installiert lxml-3.6.4 ' – hyppos
So funktioniert es? Akzeptieren Sie die Antwort, wenn es funktioniert. – Steampunkery