簡體   English   中英

在python 2.7.9上安裝pylzma時出錯

[英]Erroring when installing pylzma on python 2.7.9

我正在嘗試通過python 2.7.9上的pip安裝Pylzma,並且出現以下錯誤:

    C:\Python27\Scripts>pip.exe install pylzma
Downloading/unpacking pylzma
  Running setup.py (path:c:\users\username\appdata\local\temp\pip_build_username\pylzma\setup.py) egg_info for package pylzma

    warning: no files found matching '*.py' under directory 'test'
    warning: no files found matching '*.7z' under directory 'test'
    no previously-included directories found matching 'src\sdk.orig'
Installing collected packages: pylzma
  Running setup.py install for pylzma
    adding support for multithreaded compression
    building 'pylzma' extension
    C:\Users\username\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWITH_COMPAT=1 -DPYLZMA_VERSION="0.4.6" -DCOMPRESS_MF_MT=1 -Isrc/sdk -IC:\Python27\include -IC:\Python27\PC /Tcsrc/pylzma/pylzma.c /Fobuild\temp.win32-2.7\Release\src/pylzma/pylzma.obj /MT
    cl : Command line warning D9025 : overriding '/MD' with '/MT'
    pylzma.c
    src/pylzma/pylzma.c(284) : error C2440: 'function' : cannot convert from 'double' to 'const char *'
    src/pylzma/pylzma.c(284) : warning C4024: 'PyModule_AddStringConstant' : different types for formal and actual parameter 3
    src/pylzma/pylzma.c(284) : error C2143: syntax error : missing ')' before 'constant'
    src/pylzma/pylzma.c(284) : error C2059: syntax error : ')'
    error: command 'C:\\Users\\username\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
    Complete output from command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\username\\appdata\\local\\temp\\pip_build_username\\pylzma\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\username\appdata\local\temp\pip-4onyx_-record\install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build\lib.win32-2.7

copying py7zlib.py -> build\lib.win32-2.7

running build_ext

adding support for multithreaded compression

building 'pylzma' extension

creating build\temp.win32-2.7

creating build\temp.win32-2.7\Release

creating build\temp.win32-2.7\Release\src

creating build\temp.win32-2.7\Release\src\pylzma

creating build\temp.win32-2.7\Release\src\sdk

creating build\temp.win32-2.7\Release\src\7zip

creating build\temp.win32-2.7\Release\src\7zip\C

creating build\temp.win32-2.7\Release\src\compat

C:\Users\username\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWITH_COMPAT=1 -DPYLZMA_VERSION="0.4.6" -DCOMPRESS_MF_MT=1 -Isrc/sdk -IC:\Python27\include -IC:\Python27\PC /Tcsrc/pylzma/pylzma.c /Fobuild\temp.win32-2.7\Release\src/pylzma/pylzma.obj /MT

cl : Command line warning D9025 : overriding '/MD' with '/MT'

pylzma.c

src/pylzma/pylzma.c(284) : error C2440: 'function' : cannot convert from 'double' to 'const char *'

src/pylzma/pylzma.c(284) : warning C4024: 'PyModule_AddStringConstant' : different types for formal and actual parameter 3

src/pylzma/pylzma.c(284) : error C2143: syntax error : missing ')' before 'constant'

src/pylzma/pylzma.c(284) : error C2059: syntax error : ')'

error: command 'C:\\Users\\username\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

----------------------------------------
Cleaning up...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\username\\appdata\\local\\temp\\pip_build_username\\pylzma\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\username\appdata\local\temp\pip-4onyx_-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\username\appdata\local\temp\pip_build_username\pylzma
Storing debug log for failure in C:\Users\username\pip\pip.log

這是調試日志:

------------------------------------------------------------
C:\Python27\Scripts\pip run on 05/22/15 09:32:07
Downloading/unpacking pylzma
  Getting page https://pypi.python.org/simple/pylzma/
  URLs to search for versions for pylzma:
  * https://pypi.python.org/simple/pylzma/
  Analyzing links from page https://pypi.python.org/simple/pylzma/
    Skipping link https://pypi.python.org/packages/2.3/p/pylzma/pylzma-0.3.0-py2.3-win32.egg#md5=68b539bc322e44e5a087c79c25d82543 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.3/p/pylzma/pylzma-0.3.0.win32-py2.3.exe#md5=cbbaf0541e32c8d1394eea89ce3910b7 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .exe
    Skipping link https://pypi.python.org/packages/2.3/p/pylzma/pylzma-0.4.1-py2.3-win32.egg#md5=03829ce881b4627d6ded08c138cc8997 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.3/p/pylzma/pylzma-0.4.2-py2.3-win32.egg#md5=1ae4940ad183f220e5102e32a7f5b496 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.3/p/pylzma/pylzma-0.4.4-py2.3-win32.egg#md5=26849b5afede8a44117e6b6cb0e4fc4d (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/p/pylzma/pylzma-0.3.0-py2.4-win32.egg#md5=221208a0e4e9bcbffbb2c0ce80eafc11 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/p/pylzma/pylzma-0.3.0.win32-py2.4.exe#md5=7152a76c28905ada5290c8e6c459d715 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .exe
    Skipping link https://pypi.python.org/packages/2.4/p/pylzma/pylzma-0.4.1-py2.4-win32.egg#md5=c773b74772799b8cc021ea8e7249db46 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/p/pylzma/pylzma-0.4.2-py2.4-win32.egg#md5=bf837af2374358f167008585c19d2f26 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/p/pylzma/pylzma-0.4.4-py2.4-win32.egg#md5=9a657211e107da0261ed7a2f029566c4 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/p/pylzma/pylzma-0.3.0-py2.5-win32.egg#md5=911d4e0b3cbf27c8e62abea1b6ded60e (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/p/pylzma/pylzma-0.3.0.win32-py2.5.exe#md5=bc1c3d4a402984056acf85a251ba347c (from https://pypi.python.org/simple/pylzma/); unknown archive format: .exe
    Skipping link https://pypi.python.org/packages/2.5/p/pylzma/pylzma-0.4.1-py2.5-win32.egg#md5=429f2087bf14390191faf6d85292186c (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/p/pylzma/pylzma-0.4.2-py2.5-win32.egg#md5=bf8036d15fd61d6a47bb1caf0df45e69 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/p/pylzma/pylzma-0.4.4-py2.5-win32.egg#md5=3c8f6361bee16292fdbfda70f1dc0006 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.6/p/pylzma/pylzma-0.4.1-py2.6-win32.egg#md5=4248c0e618532f137860b021e6915b32 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.6/p/pylzma/pylzma-0.4.2-py2.6-win32.egg#md5=2c5f136a75b3c114a042f5f61bdd5d8a (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.6/p/pylzma/pylzma-0.4.4-py2.6-win32.egg#md5=8c7ae08bafbfcfd9ecbdffe9e4c9c6c5 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.7/p/pylzma/pylzma-0.4.4-py2.7-win32.egg#md5=caee91027d5c005b012e2132e434f425 (from https://pypi.python.org/simple/pylzma/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/p/pylzma/pylzma-0.3.0.tar.gz#md5=7ab1a1706cf3e19f2d10579d795babf7 (from https://pypi.python.org/simple/pylzma/), version: 0.3.0
    Found link https://pypi.python.org/packages/source/p/pylzma/pylzma-0.4.1.tar.gz#md5=b64557e8c4bcd0973f037bb4ddc413c6 (from https://pypi.python.org/simple/pylzma/), version: 0.4.1
    Found link https://pypi.python.org/packages/source/p/pylzma/pylzma-0.4.2.tar.gz#md5=ab37d6ce2374f4308447bff963ae25ef (from https://pypi.python.org/simple/pylzma/), version: 0.4.2
    Found link https://pypi.python.org/packages/source/p/pylzma/pylzma-0.4.3.tar.gz#md5=e53d40599ca2b039dedade6069724b7b (from https://pypi.python.org/simple/pylzma/), version: 0.4.3
    Found link https://pypi.python.org/packages/source/p/pylzma/pylzma-0.4.4.tar.gz#md5=a2be89cb2288174ebb18bec68fa559fb (from https://pypi.python.org/simple/pylzma/), version: 0.4.4
    Found link https://pypi.python.org/packages/source/p/pylzma/pylzma-0.4.5.tar.gz#md5=4fda4666c60faa9a092524fdda0e2f98 (from https://pypi.python.org/simple/pylzma/), version: 0.4.5
    Found link https://pypi.python.org/packages/source/p/pylzma/pylzma-0.4.6.tar.gz#md5=140038c8c187770eecfe7041b34ec9b9 (from https://pypi.python.org/simple/pylzma/), version: 0.4.6
  Using version 0.4.6 (newest of versions: 0.4.6, 0.4.5, 0.4.4, 0.4.3, 0.4.2, 0.4.1, 0.3.0)
  Downloading from URL https://pypi.python.org/packages/source/p/pylzma/pylzma-0.4.6.tar.gz#md5=140038c8c187770eecfe7041b34ec9b9 (from https://pypi.python.org/simple/pylzma/)
  Running setup.py (path:c:\users\username\appdata\local\temp\pip_build_username\pylzma\setup.py) egg_info for package pylzma
    running egg_info
    creating pip-egg-info\pylzma.egg-info
    writing requirements to pip-egg-info\pylzma.egg-info\requires.txt
    writing pip-egg-info\pylzma.egg-info\PKG-INFO
    writing top-level names to pip-egg-info\pylzma.egg-info\top_level.txt
    writing dependency_links to pip-egg-info\pylzma.egg-info\dependency_links.txt
    writing manifest file 'pip-egg-info\pylzma.egg-info\SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info\pylzma.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.py' under directory 'test'
    warning: no files found matching '*.7z' under directory 'test'
    no previously-included directories found matching 'src\sdk.orig'
    writing manifest file 'pip-egg-info\pylzma.egg-info\SOURCES.txt'
  Source in c:\users\username\appdata\local\temp\pip_build_username\pylzma has version 0.4.6, which satisfies requirement pylzma
Installing collected packages: pylzma
  Running setup.py install for pylzma
    Running command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\username\\appdata\\local\\temp\\pip_build_username\\pylzma\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\username\appdata\local\temp\pip-4onyx_-record\install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    copying py7zlib.py -> build\lib.win32-2.7
    running build_ext
    adding support for multithreaded compression
    building 'pylzma' extension
    creating build\temp.win32-2.7
    creating build\temp.win32-2.7\Release
    creating build\temp.win32-2.7\Release\src
    creating build\temp.win32-2.7\Release\src\pylzma
    creating build\temp.win32-2.7\Release\src\sdk
    creating build\temp.win32-2.7\Release\src\7zip
    creating build\temp.win32-2.7\Release\src\7zip\C
    creating build\temp.win32-2.7\Release\src\compat
    C:\Users\username\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWITH_COMPAT=1 -DPYLZMA_VERSION="0.4.6" -DCOMPRESS_MF_MT=1 -Isrc/sdk -IC:\Python27\include -IC:\Python27\PC /Tcsrc/pylzma/pylzma.c /Fobuild\temp.win32-2.7\Release\src/pylzma/pylzma.obj /MT
    cl : Command line warning D9025 : overriding '/MD' with '/MT'
    pylzma.c
    src/pylzma/pylzma.c(284) : error C2440: 'function' : cannot convert from 'double' to 'const char *'
    src/pylzma/pylzma.c(284) : warning C4024: 'PyModule_AddStringConstant' : different types for formal and actual parameter 3
    src/pylzma/pylzma.c(284) : error C2143: syntax error : missing ')' before 'constant'
    src/pylzma/pylzma.c(284) : error C2059: syntax error : ')'
    error: command 'C:\\Users\\username\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
    Complete output from command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\username\\appdata\\local\\temp\\pip_build_username\\pylzma\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\username\appdata\local\temp\pip-4onyx_-record\install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build\lib.win32-2.7

copying py7zlib.py -> build\lib.win32-2.7

running build_ext

adding support for multithreaded compression

building 'pylzma' extension

creating build\temp.win32-2.7

creating build\temp.win32-2.7\Release

creating build\temp.win32-2.7\Release\src

creating build\temp.win32-2.7\Release\src\pylzma

creating build\temp.win32-2.7\Release\src\sdk

creating build\temp.win32-2.7\Release\src\7zip

creating build\temp.win32-2.7\Release\src\7zip\C

creating build\temp.win32-2.7\Release\src\compat

C:\Users\username\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWITH_COMPAT=1 -DPYLZMA_VERSION="0.4.6" -DCOMPRESS_MF_MT=1 -Isrc/sdk -IC:\Python27\include -IC:\Python27\PC /Tcsrc/pylzma/pylzma.c /Fobuild\temp.win32-2.7\Release\src/pylzma/pylzma.obj /MT

cl : Command line warning D9025 : overriding '/MD' with '/MT'

pylzma.c

src/pylzma/pylzma.c(284) : error C2440: 'function' : cannot convert from 'double' to 'const char *'

src/pylzma/pylzma.c(284) : warning C4024: 'PyModule_AddStringConstant' : different types for formal and actual parameter 3

src/pylzma/pylzma.c(284) : error C2143: syntax error : missing ')' before 'constant'

src/pylzma/pylzma.c(284) : error C2059: syntax error : ')'

error: command 'C:\\Users\\username\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

----------------------------------------
Cleaning up...
  Removing temporary dir c:\users\username\appdata\local\temp\pip_build_username...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\username\\appdata\\local\\temp\\pip_build_username\\pylzma\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\username\appdata\local\temp\pip-4onyx_-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\username\appdata\local\temp\pip_build_username\pylzma
Exception information:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Python27\lib\site-packages\pip\req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Python27\lib\site-packages\pip\req.py", line 706, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\Python27\lib\site-packages\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\username\\appdata\\local\\temp\\pip_build_username\\pylzma\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\username\appdata\local\temp\pip-4onyx_-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\username\appdata\local\temp\pip_build_username\pylzma

我確保我以管理員身份運行提示,我已重新啟動,並已用Google搜索,但找不到任何東西。 有什么建議么?

我也收到該編譯錯誤。 希望很快能解決。 在此期間,有可用的二進制程序包,請參閱: pip如何在Windows 7 x64和python 2.7上安裝pylzma

此錯誤是一個已記錄的錯誤,已得到解決,並已在第29個問題中推送到了pip倉庫中。 Pip安裝應該可以在新版本中再次使用。

https://github.com/fancycode/pylzma/issues/29#issuecomment-125749627

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM