刚刚找到了这个records library(版本0.5.0)的Python(我的版本是3.6.0),并试图用
安装它$ pip3 install records
包加载并完成,但之后安装将退出此错误:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cgungwv4/tablib/
日志的其余部分说:
Using cached tablib-0.11.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-cgungwv4/tablib/setup.py", line 7, in <module>
import tablib
File "/tmp/pip-build-cgungwv4/tablib/tablib/__init__.py", line 3, in <module>
from tablib.core import (
File "/tmp/pip-build-cgungwv4/tablib/tablib/core.py", line 15, in <module>
from tablib import formats
File "/tmp/pip-build-cgungwv4/tablib/tablib/formats/__init__.py", line 6, in <module>
from . import _csv as csv
File "/tmp/pip-build-cgungwv4/tablib/tablib/formats/_csv.py", line 6, in <module>
from tablib.compat import is_py3, csv, StringIO
File "/tmp/pip-build-cgungwv4/tablib/tablib/compat.py", line 25, in <module>
import tablib.packages.xlwt3 as xlwt
File "/tmp/pip-build-cgungwv4/tablib/tablib/packages/xlwt3/__init__.py", line 5, in <module>
from .Row import Row
File "/tmp/pip-build-cgungwv4/tablib/tablib/packages/xlwt3/Row.py", line 7, in <module>
from . import ExcelFormula
File "/tmp/pip-build-cgungwv4/tablib/tablib/packages/xlwt3/ExcelFormula.py", line 1, in <module>
from . import ExcelFormulaParser, ExcelFormulaLexer
File "/tmp/pip-build-cgungwv4/tablib/tablib/packages/xlwt3/ExcelFormulaLexer.py", line 52, in <module>
VERBOSE+LOCALE+IGNORECASE)
File "/usr/local/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/usr/local/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/local/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/usr/local/lib/python3.6/sre_parse.py", line 866, in parse
p.pattern.flags = fix_flags(str, p.pattern.flags)
File "/usr/local/lib/python3.6/sre_parse.py", line 833, in fix_flags
raise ValueError("cannot use LOCALE flag with a str pattern")
ValueError: cannot use LOCALE flag with a str pattern
有没有人知道如何解决这个问题?在此先感谢:)
答案 0 :(得分:1)
请参阅tablib中的问题:https://github.com/kennethreitz/tablib/issues/267
您的选择:
1)等到他们修复了pip版本
2)自己从主分支安装它,似乎已经修复了