Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing through pip fails in python 3 #61

Closed
waspinator opened this issue May 2, 2017 · 10 comments
Closed

installing through pip fails in python 3 #61

waspinator opened this issue May 2, 2017 · 10 comments

Comments

@waspinator
Copy link

> pip install libtiff
Collecting libtiff
  Downloading libtiff-0.4.0.tar.gz (119kB)
    100% |████████████████████████████████| 122kB 2.9MB/s
    Complete output from command python setup.py egg_info:
    Warning: Assuming default configuration (libtiff/bitarray-0.3.5-numpy/bitarray/{setup_bitarray,setup}.py was not found)Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/tv/0sj3cm251x14b29kb6xzs27r0000gn/T/pip-build-nwvzm3eq/libtiff/setup.py", line 96, in <module>
        configuration = configuration,
      File "/Users/waspinator/anaconda/lib/python3.5/site-packages/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/private/var/folders/tv/0sj3cm251x14b29kb6xzs27r0000gn/T/pip-build-nwvzm3eq/libtiff/setup.py", line 67, in configuration
        config.get_version('libtiff/version.py')
      File "/Users/waspinator/anaconda/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 1917, in get_version
        fn, info)
      File "/Users/waspinator/anaconda/lib/python3.5/site-packages/numpy/compat/py3k.py", line 112, in npy_load_module
        return importlib.machinery.SourceFileLoader(name, fn).load_module()
      File "<frozen importlib._bootstrap_external>", line 388, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 809, in load_module
      File "<frozen importlib._bootstrap_external>", line 668, in load_module
      File "<frozen importlib._bootstrap>", line 268, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 693, in _load
      File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 661, in exec_module
      File "<frozen importlib._bootstrap_external>", line 767, in get_code
      File "<frozen importlib._bootstrap_external>", line 727, in source_to_code
      File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
      File "libtiff/version.py", line 30
        print version
                    ^
    SyntaxError: Missing parentheses in call to 'print'
    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')
@JunMa11
Copy link

JunMa11 commented May 4, 2017

I have the same problem.
Do you solve this issue?

@waspinator
Copy link
Author

@EdwardMa12593 I downloaded the code from here and ran python setup.py install instead.

@jakirkham
Copy link
Contributor

There is no release on PyPI with Python 3 support. It only exists in master.

IMHO this should be closed as unsupported until a Python 3 release makes its way to PyPI, at which point a new bug report should be opened if an issue occurs.

@waspinator
Copy link
Author

This repo doesn't have any tags or releases.python setup.py --version from master outputs 0.0.0. Is there a roadmap to releases?

@jakirkham
Copy link
Contributor

I don't think that is an issue with this library, @jason-su. It is either numpy is not installed and/or MSVC 14.0 is missing. Have you installed both of these?

@pearu
Copy link
Owner

pearu commented Sep 23, 2017

PyLibTiff 0.4.1 has been released and I just checked, pip3 install libtiff works.

@pearu pearu closed this as completed Sep 23, 2017
@hanchec
Copy link

hanchec commented Oct 24, 2017

I know this thread has been closed but I'm new to libtiff and have problems installing it. I keep getting the error:

ImportError: Failed to find TIFF library. Make sure that libtiff is installed and its location is listed in PATH|LD_LIBRARY_PATH|..

I tried the installation 2 ways and neither worked. Thanks in advance for your help.

[1] pip3 install libtiff
Collecting libtiff
Downloading libtiff-0.4.1.tar.gz (129kB)
...
Successfully installed libtiff-0.4.1

[2] Download the tarball from https://pypi.python.org/pypi/libtiff
tar -zxvf libtiff-0.4.1.tar.gz
cd libtiff-0.4.1/libtiff
python3 setup.py install

@jtlz2
Copy link

jtlz2 commented Jun 5, 2018

@hanchec Ditto...

@shimon-c-orbo
Copy link

I've downloaded the latest version windows 10. Do I need to get the dll as well?
From where do I get it?

@jackb007
Copy link

jackb007 commented Jul 16, 2021

What worked for me after trying everything:

  1. Download the libtiff pre-compiled wheel from here:
    https://www.lfd.uci.edu/~gohlke/pythonlibs/#pylibtiff
    and the bitarray pre-compiled wheel from here:
    https://www.lfd.uci.edu/~gohlke/pythonlibs/#bitarray
  2. Open command prompt:
    cd C:\path\to\where\your-wheels-are
    pip3 install bitarray-x.y.z.whl
    pip3 install libtiff-t.u.v.whl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants