pearu / pylibtiff

A Python tiff library
Other
130 stars 55 forks source link

error install:Assuming default configuration (libtiff\bitarray-a1646c0\bitarray/{setup_bitarray,setup}.py was not found) #76

Open zhenzhenbadgirl opened 6 years ago

zhenzhenbadgirl commented 6 years ago

when i downloaded the code then ran python setup.py install, or run pip install libtiff, aways wrong. numpy version: 1.12.1 thank you

(C:\Users\hellome\Anaconda3) C:\Users\hellome\Downloads\pylibtiff-master>pip install libtiff
Collecting libtiff
  Using cached https://files.pythonhosted.org/packages/18/8f/b844284d43d385c08967b25eb76f625a5f06490cc4680e1764458705375
6/libtiff-0.4.2.tar.gz
Building wheels for collected packages: libtiff
  Running setup.py bdist_wheel for libtiff ... error
  Complete output from command C:\Users\hellome\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\User
s\\hellome\\AppData\\Local\\Temp\\pip-build-j41hmbrm\\libtiff\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=
f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\hellome\AppData\Lo
cal\Temp\tmpcauz6nndpip-wheel- --python-tag cp36:
  Appending libtiff.bitarray configuration to libtiff
  Ignoring attempt to set 'name' (from 'libtiff' to 'libtiff.bitarray')
  Appending libtiff configuration to
  Ignoring attempt to set 'name' (from '' to 'libtiff')
  0.4.2
  running bdist_wheel
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  running build_src
  build_src
  building extension "bittools" sources
  building extension "tif_lzw" sources
  building extension "libtiff.bitarray._bitarray" sources
  building extension "libtiff.bittools" sources
  building extension "libtiff.tif_lzw" sources
  building data_files sources
  build_src: building npy-pkg config files
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\libtiff
  copying libtiff\libtiff_ctypes.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\lsm.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\lzw.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\optparse_gui.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\script_options.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\setup.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\test_bittools.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_array.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_base.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_channels_and_files.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_data.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_file.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_files.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_3_8_2.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_3_9_2.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_3_9_4.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_3_9_5.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_4_0_1.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_4_0_2.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_4_0_3.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_4_0_6.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_4_0_7.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_4_0_8.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_h_4_0_9.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_image.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\tiff_sample_plane.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\utils.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\version.py -> build\lib.win-amd64-3.6\libtiff
  copying libtiff\__init__.py -> build\lib.win-amd64-3.6\libtiff
  creating build\lib.win-amd64-3.6\libtiff\bitarray
  copying libtiff\bitarray-a1646c0\bitarray\test_bitarray.py -> build\lib.win-amd64-3.6\libtiff\bitarray
  copying libtiff\bitarray-a1646c0\bitarray\__init__.py -> build\lib.win-amd64-3.6\libtiff\bitarray
  running build_ext
  Looking for python36.dll
  Building import library (arch=AMD64): "C:\Users\hellome\Anaconda3\libs\libpython36.a" (from C:\Users\hellome\Anaconda3\pyt
hon36.dll)
  Warning: Assuming default configuration (libtiff\bitarray-a1646c0\bitarray/{setup_bitarray,setup}.py was not found)Tra
ceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\hellome\AppData\Local\Temp\pip-build-j41hmbrm\libtiff\setup.py", line 108, in <module>
      ext_modules=[bittools_mod, tif_lzw_mod], requires=['numpy']
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\core.py", line 166, in setup
      return old_setup(**new_attr)
    File "C:\Users\hellome\Anaconda3\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\hellome\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "C:\Users\hellome\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\command\build.py", line 47, in run
      old_build.run(self)
    File "C:\Users\hellome\Anaconda3\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "C:\Users\hellome\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\command\build_ext.py", line 117, in run
      force=self.force)
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\ccompiler.py", line 596, in new_compiler
      compiler = klass(None, dry_run, force)
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 93, in __init__
      build_import_library()
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 377, in build_import_lib
rary
      return _build_import_library_amd64()
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 399, in _build_import_li
brary_amd64
      generate_def(dll_file, def_file)
    File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 271, in generate_def
      if _START.match(dump[i].decode()):
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 37: invalid start byte

  ----------------------------------------
  Failed building wheel for libtiff
  Running setup.py clean for libtiff
Failed to build libtiff
Installing collected packages: libtiff
  Running setup.py install for libtiff ... error
    Complete output from command C:\Users\hellome\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Us
ers\\hellome\\AppData\\Local\\Temp\\pip-build-j41hmbrm\\libtiff\\setup.py';f=getattr(tokenize, 'open', open)(__file__);cod
e=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\hellome\AppDat
a\Local\Temp\pip-3nfa4av6-record\install-record.txt --single-version-externally-managed --compile:
    Appending libtiff.bitarray configuration to libtiff
    Ignoring attempt to set 'name' (from 'libtiff' to 'libtiff.bitarray')
    Appending libtiff configuration to
    Ignoring attempt to set 'name' (from '' to 'libtiff')
    0.4.2
    running install
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building extension "bittools" sources
    building extension "tif_lzw" sources
    building extension "libtiff.bitarray._bitarray" sources
    building extension "libtiff.bittools" sources
    building extension "libtiff.tif_lzw" sources
    building data_files sources
    build_src: building npy-pkg config files
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\libtiff
    copying libtiff\libtiff_ctypes.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\lsm.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\lzw.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\optparse_gui.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\script_options.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\setup.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\test_bittools.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_array.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_base.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_channels_and_files.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_data.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_file.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_files.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_3_8_2.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_3_9_2.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_3_9_4.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_3_9_5.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_4_0_1.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_4_0_2.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_4_0_3.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_4_0_6.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_4_0_7.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_4_0_8.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_h_4_0_9.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_image.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\tiff_sample_plane.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\utils.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\version.py -> build\lib.win-amd64-3.6\libtiff
    copying libtiff\__init__.py -> build\lib.win-amd64-3.6\libtiff
    creating build\lib.win-amd64-3.6\libtiff\bitarray
    copying libtiff\bitarray-a1646c0\bitarray\test_bitarray.py -> build\lib.win-amd64-3.6\libtiff\bitarray
    copying libtiff\bitarray-a1646c0\bitarray\__init__.py -> build\lib.win-amd64-3.6\libtiff\bitarray
    running build_ext
    Looking for python36.dll
    Building import library (arch=AMD64): "C:\Users\hellome\Anaconda3\libs\libpython36.a" (from C:\Users\hellome\Anaconda3\p
ython36.dll)
    Warning: Assuming default configuration (libtiff\bitarray-a1646c0\bitarray/{setup_bitarray,setup}.py was not found)T
raceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\hellome\AppData\Local\Temp\pip-build-j41hmbrm\libtiff\setup.py", line 108, in <module>
        ext_modules=[bittools_mod, tif_lzw_mod], requires=['numpy']
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\core.py", line 166, in setup
        return old_setup(**new_attr)
      File "C:\Users\hellome\Anaconda3\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\command\install.py", line 62, in run
        r = self.setuptools_run()
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\command\install.py", line 36, in setuptools_run
        return distutils_install.run(self)
      File "C:\Users\hellome\Anaconda3\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\hellome\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\command\build.py", line 47, in run
        old_build.run(self)
      File "C:\Users\hellome\Anaconda3\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\hellome\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\hellome\Anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\command\build_ext.py", line 117, in run
        force=self.force)
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\ccompiler.py", line 596, in new_compiler
        compiler = klass(None, dry_run, force)
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 93, in __init__
        build_import_library()
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 377, in build_import_l
ibrary
        return _build_import_library_amd64()
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 399, in _build_import_
library_amd64
        generate_def(dll_file, def_file)
      File "C:\Users\hellome\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 271, in generate_def
        if _START.match(dump[i].decode()):
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 37: invalid start byte

    ----------------------------------------
Command "C:\Users\hellome\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\hellome\\AppData\\Loc
al\\Temp\\pip-build-j41hmbrm\\libtiff\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n
', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\hellome\AppData\Local\Temp\pip-3nfa4av
6-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\hellome\Ap
pData\Local\Temp\pip-build-j41hmbrm\libtiff\
pearu commented 5 years ago

I will test this after uploading a new pylibtiff release to pypi.