[問題] twstock遇到的ValueError

作者: motorrockA (motor)   2020-02-06 22:58:50
小弟在 import twstock時候就會遇到以下valueError問題
不知道要如何解?
謝謝版上大大
Traceback (most recent call last):
File ".\6-1.py", line 1, in <module>
import twstock
File "C:\Users\alan\AppData\Local\Programs\Python\Python38\lib\site-packages\
twstock\__init__.py", line 3, in <module>
from twstock import stock
File "C:\Users\alan\AppData\Local\Programs\Python\Python38\lib\site-packages\
twstock\stock.py", line 18, in <module>
from .codes import codes
File "C:\Users\alan\AppData\Local\Programs\Python\Python38\lib\site-packages\
twstock\codes\__init__.py", line 1, in <module>
from .fetch import __update_codes
File "C:\Users\alan\AppData\Local\Programs\Python\Python38\lib\site-packages\
twstock\codes\fetch.py", line 14, in <module>
from lxml import etree
File "type.pxd", line 9, in init lxml.etree
ValueError: builtins.type size changed, may indicate binary incompatibility.
Expected 880 from C header, got 864 from PyObject
作者: outshaker (out)   2020-02-07 05:23:00
有可能你安裝的lxml版本太舊了
作者: abr810416 (無敵鐵金剛)   2020-02-07 21:07:00
大量台股資料可以考慮finmind

Links booklink

Contact Us: admin [ a t ] ucptt.com