jpegio icon indicating copy to clipboard operation
jpegio copied to clipboard

Installation error on macOS Ventura Version 13.3.1

Open xiaonengmiao opened this issue 1 year ago • 3 comments

python setup.py install

will give the following TypeError. Is this because I am using a m1 chip mac?

[LIBJPEG] libjpeg-turbo is used for the functionality of libjpeg.
DIR_LIBJPEG_HEADER: /Users/Icerm/Downloads/jpegio/jpegio/libjpeg-turbo/mac_x64/include
DIR_LIBJPEG_SOURCE: jpegio/libjpeg-turbo/mac_x64/src
Compiling jpegio/componentinfo.pyx because it changed.
Compiling jpegio/decompressedjpeg.pyx because it changed.
[1/2] Cythonizing jpegio/componentinfo.pyx
[2/2] Cythonizing jpegio/decompressedjpeg.pyx
Traceback (most recent call last):
  File "/Users/Icerm/Downloads/jpegio/setup.py", line 137, in <module>
    setup(name='jpegio',
  File "/opt/miniconda3/envs/lilac/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
    _install_setup_requires(attrs)
  File "/opt/miniconda3/envs/lilac/lib/python3.10/site-packages/setuptools/__init__.py", line 75, in _install_setup_requires
    dist = MinimalDistribution(attrs)
  File "/opt/miniconda3/envs/lilac/lib/python3.10/site-packages/setuptools/__init__.py", line 57, in __init__
    super().__init__(filtered)
  File "/opt/miniconda3/envs/lilac/lib/python3.10/site-packages/setuptools/dist.py", line 474, in __init__
    for ep in metadata.entry_points(group='distutils.setup_keywords'):
  File "/opt/miniconda3/envs/lilac/lib/python3.10/importlib/metadata/__init__.py", line 1009, in entry_points
    return SelectableGroups.load(eps).select(**params)
  File "/opt/miniconda3/envs/lilac/lib/python3.10/importlib/metadata/__init__.py", line 459, in load
    ordered = sorted(eps, key=by_group)
  File "/opt/miniconda3/envs/lilac/lib/python3.10/importlib/metadata/__init__.py", line 1006, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "/opt/miniconda3/envs/lilac/lib/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen
    k = key(element)
  File "/opt/miniconda3/envs/lilac/lib/python3.10/importlib/metadata/__init__.py", line 941, in _normalized_name
    return self._name_from_stem(stem) or super()._normalized_name
  File "/opt/miniconda3/envs/lilac/lib/python3.10/importlib/metadata/__init__.py", line 622, in _normalized_name
    return Prepared.normalize(self.name)
  File "/opt/miniconda3/envs/lilac/lib/python3.10/importlib/metadata/__init__.py", line 871, in normalize
    return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
  File "/opt/miniconda3/envs/lilac/lib/python3.10/re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

xiaonengmiao avatar Apr 25 '23 09:04 xiaonengmiao

I will check compiling on macOS (M1). Thanks for sharing this!

dwgoon avatar Apr 28 '23 05:04 dwgoon

I should be working now after https://github.com/dwgoon/jpegio/pull/27 could you check it now please? @xiaonengmiao

detrin avatar Aug 14 '23 10:08 detrin

I should be working now after #27 could you check it now please? @xiaonengmiao

Thanks for the fix. Here is the output of install and import jpegio: Screenshot 2023-08-15 at 11 03 48 AM Screenshot 2023-08-15 at 11 04 45 AM If i run python setup.py install again 'jpegint.h' file not found error is gone. But the ImportError in the second screenshot still exists. I am using a m1 chip mac and python 3.11.4 and i see jstruct.h is in jpegio. Is this because of clang?

xiaonengmiao avatar Aug 15 '23 03:08 xiaonengmiao