fancycode / pylzma

Python bindings for the LZMA library
http://www.joachim-bauch.de/projects/pylzma/
GNU Lesser General Public License v2.1
234 stars 72 forks source link

pylzma instalation failed on windows 7 os #34

Closed vkosuri closed 8 years ago

vkosuri commented 8 years ago

pylzma instalation failed on windows 7 os

Error information i got on my terminal

C:\Users\vkosuri\Dropbox\projects\archivelibrary-master>pip install pylzma
Collecting pylzma
C:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py
:90: InsecurePlatformWarning: A true SSLContext object is not available. This pr
events urllib3 from configuring SSL appropriately and may cause certain SSL conn
ections to fail. For more information, see https://urllib3.readthedocs.org/en/la
test/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading pylzma-0.4.8.tar.gz (115kB)
    100% |################################| 118kB 225kB/s
Installing collected packages: pylzma
  Running setup.py install for pylzma
    Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\vkosuri\\appdata\\local\\temp\\pip-build-teeh7v\\py
lzma\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().re
place('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\vkosuri\appda
ta\local\temp\pip-7q_tjn-record\install-record.txt --single-version-externally-m
anaged --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    copying py7zlib.py -> build\lib.win-amd64-2.7
    running build_ext
    adding support for multithreaded compression
    building 'pylzma' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\vkosuri\appdata\local\temp\pip-build-teeh7v\pylzma\setup.py
", line 192, in <module>
        zip_safe = False,
      File "C:\Python27\lib\distutils\core.py", line 151, in setup
        dist.run_commands()
      File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 6
1, in run
        return orig.install.run(self)
      File "C:\Python27\lib\distutils\command\install.py", line 563, in run
        self.run_command('build')
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\distutils\command\build.py", line 127, in run
        self.run_command(cmd_name)
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
        self.build_extensions()
      File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in build_
extensions
        self.build_extension(ext)
      File "c:\users\vkosuri\appdata\local\temp\pip-build-teeh7v\pylzma\setup.py
", line 125, in build_extension
        _build_ext.build_extension(self, ext)
      File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in build_
extension
        depends=ext.depends)
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
        self.initialize()
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize

        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "C:\Python27\lib\site-packages\setuptools\msvc9_support.py", line 52,
 in query_vcvarsall
        return unpatched['query_vcvarsall'](version, *args, **kwargs)
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcva
rsall
        raise ValueError(str(list(result.keys())))
    ValueError: [u'path']

    ----------------------------------------
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\us
ers\\vkosuri\\appdata\\local\\temp\\pip-build-teeh7v\\pylzma\\setup.py';exec(com
pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f
ile__, 'exec'))" install --record c:\users\vkosuri\appdata\local\temp\pip-7q_tjn
-record\install-record.txt --single-version-externally-managed --compile" failed
 with error code 1 in c:\users\vkosuri\appdata\local\temp\pip-build-teeh7v\pylzm
a
C:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py
:90: InsecurePlatformWarning: A true SSLContext object is not available. This pr
events urllib3 from configuring SSL appropriately and may cause certain SSL conn
ections to fail. For more information, see https://urllib3.readthedocs.org/en/la
test/security.html#insecureplatformwarning.
  InsecurePlatformWarning
fancycode commented 8 years ago

According to the stacktrace there seems to be an error in Python distutils when it tries to find the MSVC compiler. Do you have a Visual Studio installed and used it to compile other Python extensions before?