pip Python 2.7中破折号的安装错误



我希望在Python 2.7上安装Dash。

我相信Python 2.7支持Dash,如这里所示

我运行以下命令,因为我有两个版本的python(2.7和3.8):
py -2 -m pip install dash==1.19.0

但是,我收到以下错误:

ERROR: Command errored out with exit status 1:
command: 'C:Python27python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\windowsuser\appdata\local\temp\pip-install-nfgoxk\brotli\setup.py'"'"'; __file__='"'"'c:\users\windowsuser\appdata\local\temp\pip-install-nfgoxk\brotli\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'c:userswindowsuserappdatalocaltemppip-record-dssb81install-record.txt' --single-version-externally-managed --compile --install-headers 'C:Python27Includebrotli'
cwd: c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotli
Complete output (93 lines):
running install
running build
running build_py
creating bin
creating binlib.win-amd64-2.7
copying pythonbrotli.py -> binlib.win-amd64-2.7
running build_ext
building '_brotli' extension
creating bintemp.win-amd64-2.7
creating bintemp.win-amd64-2.7Release
creating bintemp.win-amd64-2.7Releasec
creating bintemp.win-amd64-2.7Releaseccommon
creating bintemp.win-amd64-2.7Releasecdec
creating bintemp.win-amd64-2.7Releasecenc
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/common/constants.c /Fobintemp.win-amd64-2.7Releasec/common/constants.obj
constants.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/common/context.c /Fobintemp.win-amd64-2.7Releasec/common/context.obj
context.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/common/dictionary.c /Fobintemp.win-amd64-2.7Releasec/common/dictionary.obj
dictionary.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/common/platform.c /Fobintemp.win-amd64-2.7Releasec/common/platform.obj
platform.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/common/transform.c /Fobintemp.win-amd64-2.7Releasec/common/transform.obj
transform.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/dec/bit_reader.c /Fobintemp.win-amd64-2.7Releasec/dec/bit_reader.obj
bit_reader.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/dec/decode.c /Fobintemp.win-amd64-2.7Releasec/dec/decode.obj
decode.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/dec/huffman.c /Fobintemp.win-amd64-2.7Releasec/dec/huffman.obj
huffman.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/dec/state.c /Fobintemp.win-amd64-2.7Releasec/dec/state.obj
state.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/backward_references.c /Fobintemp.win-amd64-2.7Releasec/enc/backward_references.obj
backward_references.c
c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotlicenc./find_match_length.h(34) : warning C4013: '_tzcnt_u64' undefined; assuming extern returning int
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/backward_references_hq.c /Fobintemp.win-amd64-2.7Releasec/enc/backward_references_hq.obj
backward_references_hq.c
c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotlicenc./find_match_length.h(34) : warning C4013: '_tzcnt_u64' undefined; assuming extern returning int
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/bit_cost.c /Fobintemp.win-amd64-2.7Releasec/enc/bit_cost.obj
bit_cost.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/block_splitter.c /Fobintemp.win-amd64-2.7Releasec/enc/block_splitter.obj
block_splitter.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/brotli_bit_stream.c /Fobintemp.win-amd64-2.7Releasec/enc/brotli_bit_stream.obj
brotli_bit_stream.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/cluster.c /Fobintemp.win-amd64-2.7Releasec/enc/cluster.obj
cluster.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/command.c /Fobintemp.win-amd64-2.7Releasec/enc/command.obj
command.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/compress_fragment.c /Fobintemp.win-amd64-2.7Releasec/enc/compress_fragment.obj
compress_fragment.c
c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotlicenc./find_match_length.h(34) : warning C4013: '_tzcnt_u64' undefined; assuming extern returning int
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/compress_fragment_two_pass.c /Fobintemp.win-amd64-2.7Releasec/enc/compress_fragment_two_pass.obj
compress_fragment_two_pass.c
c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotlicenc./find_match_length.h(34) : warning C4013: '_tzcnt_u64' undefined; assuming extern returning int
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/dictionary_hash.c /Fobintemp.win-amd64-2.7Releasec/enc/dictionary_hash.obj
dictionary_hash.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/encode.c /Fobintemp.win-amd64-2.7Releasec/enc/encode.obj
encode.c
c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotlicenc./find_match_length.h(34) : warning C4013: '_tzcnt_u64' undefined; assuming extern returning int
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/encoder_dict.c /Fobintemp.win-amd64-2.7Releasec/enc/encoder_dict.obj
encoder_dict.c
c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotlicenc./find_match_length.h(34) : warning C4013: '_tzcnt_u64' undefined; assuming extern returning int
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/entropy_encode.c /Fobintemp.win-amd64-2.7Releasec/enc/entropy_encode.obj
entropy_encode.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/fast_log.c /Fobintemp.win-amd64-2.7Releasec/enc/fast_log.obj
fast_log.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/histogram.c /Fobintemp.win-amd64-2.7Releasec/enc/histogram.obj
histogram.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/literal_cost.c /Fobintemp.win-amd64-2.7Releasec/enc/literal_cost.obj
literal_cost.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/memory.c /Fobintemp.win-amd64-2.7Releasec/enc/memory.obj
memory.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/metablock.c /Fobintemp.win-amd64-2.7Releasec/enc/metablock.obj
metablock.c
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/static_dict.c /Fobintemp.win-amd64-2.7Releasec/enc/static_dict.obj
static_dict.c
c:userswindowsuserappdatalocaltemppip-install-nfgoxkbrotlicenc./find_match_length.h(34) : warning C4013: '_tzcnt_u64' undefined; assuming extern returning int
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tcc/enc/utf8_util.c /Fobintemp.win-amd64-2.7Releasec/enc/utf8_util.obj
utf8_util.c
creating bintemp.win-amd64-2.7Releasepython
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic/include -IC:Python27include -IC:Python27PC /Tppython/_brotli.cc /Fobintemp.win-amd64-2.7Releasepython/_brotli.obj /EHsc
_brotli.cc
C:UserswindowsuserAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:Python27libs /LIBPATH:C:Python27PCbuildamd64 /LIBPATH:C:Python27PCVS9.0amd64 /EXPORT:init_brotli bintemp.win-amd64-2.7Releasec/common/constants.obj bintemp.win-amd64-2.7Releasec/common/context.obj bintemp.win-amd64-2.7Releasec/common/dictionary.obj bintemp.win-amd64-2.7Releasec/common/platform.obj bintemp.win-amd64-2.7Releasec/common/transform.obj bintemp.win-amd64-2.7Releasec/dec/bit_reader.obj bintemp.win-amd64-2.7Releasec/dec/decode.obj bintemp.win-amd64-2.7Releasec/dec/huffman.obj bintemp.win-amd64-2.7Releasec/dec/state.obj bintemp.win-amd64-2.7Releasec/enc/backward_references.obj bintemp.win-amd64-2.7Releasec/enc/backward_references_hq.obj bintemp.win-amd64-2.7Releasec/enc/bit_cost.obj bintemp.win-amd64-2.7Releasec/enc/block_splitter.obj bintemp.win-amd64-2.7Releasec/enc/brotli_bit_stream.obj bintemp.win-amd64-2.7Releasec/enc/cluster.obj bintemp.win-amd64-2.7Releasec/enc/command.obj bintemp.win-amd64-2.7Releasec/enc/compress_fragment.obj bintemp.win-amd64-2.7Releasec/enc/compress_fragment_two_pass.obj bintemp.win-amd64-2.7Releasec/enc/dictionary_hash.obj bintemp.win-amd64-2.7Releasec/enc/encode.obj bintemp.win-amd64-2.7Releasec/enc/encoder_dict.obj bintemp.win-amd64-2.7Releasec/enc/entropy_encode.obj bintemp.win-amd64-2.7Releasec/enc/fast_log.obj bintemp.win-amd64-2.7Releasec/enc/histogram.obj bintemp.win-amd64-2.7Releasec/enc/literal_cost.obj bintemp.win-amd64-2.7Releasec/enc/memory.obj bintemp.win-amd64-2.7Releasec/enc/metablock.obj bintemp.win-amd64-2.7Releasec/enc/static_dict.obj bintemp.win-amd64-2.7Releasec/enc/utf8_util.obj bintemp.win-amd64-2.7Releasepython/_brotli.obj /OUT:binlib.win-amd64-2.7_brotli.pyd /IMPLIB:bintemp.win-amd64-2.7Releasec/common_brotli.lib /MANIFESTFILE:bintemp.win-amd64-2.7Releasec/common_brotli.pyd.manifest
_brotli.obj : warning LNK4197: export 'init_brotli' specified multiple times; using first specification
Creating library bintemp.win-amd64-2.7Releasec/common_brotli.lib and object bintemp.win-amd64-2.7Releasec/common_brotli.exp
encode.obj : error LNK2001: unresolved external symbol _tzcnt_u64
static_dict.obj : error LNK2001: unresolved external symbol _tzcnt_u64
backward_references.obj : error LNK2019: unresolved external symbol _tzcnt_u64 referenced in function FindMatchLengthWithLimit
backward_references_hq.obj : error LNK2001: unresolved external symbol _tzcnt_u64
compress_fragment.obj : error LNK2001: unresolved external symbol _tzcnt_u64
compress_fragment_two_pass.obj : error LNK2001: unresolved external symbol _tzcnt_u64
binlib.win-amd64-2.7_brotli.pyd : fatal error LNK1120: 1 unresolved externals
error: command 'C:\Users\windowsuser\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe' failed with exit status 1120
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:Python27python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\windowsuser\appdata\local\temp\pip-install-nfgoxk\brotli\setup.py'"'"'; __file__='"'"'c:\users\windowsuser\appdata\local\temp\pip-install-nfgoxk\brotli\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'c:userswindowsuserappdatalocaltemppip-record-dssb81install-record.txt' --single-version-externally-managed --compile --install-headers 'C:Python27Includebrotli' Check the logs for full command output.

为什么会发生这种情况,有什么解决方案或想法吗?

*注意:在Python 2.7上安装Dash之前/之后在Python 3.8上安装Dash时没有错误。

安装brotli1.0.9时出现错误。对于brotli,这个问题也在他们的github上打开。这归结为python 2缺少whl文件,这导致pip尝试从源代码构建,但它失败了(可能是因为它没有那么简单)。

我只是在一个新鲜的环境中尝试了一下。您可以简单地安装旧版本的brotli:

pip install brotli==1.0.7

然后在后面安装破折号

最新更新