scrapinghub / dateparser

python parser for human readable dates
BSD 3-Clause "New" or "Revised" License
2.57k stars 465 forks source link

Installation problem on Synology aarch64 #1175

Closed geimist closed 1 year ago

geimist commented 1 year ago

I have been using dateparser on Synology systems for some time. Mostly it is x86_64 CPUs where it works fine. But now there are problems with the installation in an aarch64 environment. We specifically tried it with a lower version (1.0.0) for testing, but unfortunately without success.

Where is the problem, or how can I fix it?

Here is the installation log of version 1.0.0:

python3 -m pip install "dateparser==1.0.0"
Collecting dateparser==1.0.0
  Downloading dateparser-1.0.0-py2.py3-none-any.whl (279 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 279.9/279.9 kB 2.7 MB/s eta 0:00:00
Collecting python-dateutil (from dateparser==1.0.0)
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Requirement already satisfied: pytz in /volume1/@appstore/synOCR/ui/python3_env/lib/python
3.8/site-packages (from dateparser==1.0.0) (2023.3)
Collecting regex!=2019.02.19 (from dateparser==1.0.0)
  Obtaining dependency information for regex!=2019.02.19 from https://files.pythonhosted.o
rg/packages/1c/24/2ba9ef65389e08fc7663d683da5b4ca9ac8731d36861642f8777c99b099c/regex-2023.
6.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata
  Using cached regex-2023.6.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.m
etadata (40 kB)
Collecting tzlocal (from dateparser==1.0.0)
  Obtaining dependency information for tzlocal from https://files.pythonhosted.org/package
s/84/d2/730a87f0dbf184760394a85088d0d2366a5a8a32bc32ffd869a83f1de854/tzlocal-5.0.1-py3-non
e-any.whl.metadata
  Using cached tzlocal-5.0.1-py3-none-any.whl.metadata (16 kB)
Collecting six>=1.5 (from python-dateutil->dateparser==1.0.0)
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting backports.zoneinfo (from tzlocal->dateparser==1.0.0)
  Using cached backports.zoneinfo-0.2.1.tar.gz (74 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Using cached regex-2023.6.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (77
1 kB)
Using cached tzlocal-5.0.1-py3-none-any.whl (20 kB)
Building wheels for collected packages: backports.zoneinfo
  Building wheel for backports.zoneinfo (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for backports.zoneinfo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [49 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-38
      creating build/lib.linux-aarch64-cpython-38/backports
      copying src/backports/__init__.py -> build/lib.linux-aarch64-cpython-38/backports
      creating build/lib.linux-aarch64-cpython-38/backports/zoneinfo
      copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-aarch64-cpython-38/ba
ckports/zoneinfo
      copying src/backports/zoneinfo/_version.py -> build/lib.linux-aarch64-cpython-38/bac
kports/zoneinfo
      copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-aarch64-cpython-38/back
ports/zoneinfo
      copying src/backports/zoneinfo/_common.py -> build/lib.linux-aarch64-cpython-38/back
ports/zoneinfo
      copying src/backports/zoneinfo/__init__.py -> build/lib.linux-aarch64-cpython-38/bac
kports/zoneinfo
      running egg_info
      writing src/backports.zoneinfo.egg-info/PKG-INFO
      writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
      writing requirements to src/backports.zoneinfo.egg-info/requires.txt
      writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
      reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      /tmp/pip-build-env-jlgdvpu2/overlay/lib/python3.8/site-packages/setuptools/config/se
tupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!

              ****************************************************************************
****
              The license_file parameter is deprecated, use license_files instead.

              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html f
or details.
              ****************************************************************************
****

      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      warning: no files found matching '*.png' under directory 'docs'
      warning: no files found matching '*.svg' under directory 'docs'
      no previously-included directories found matching 'docs/_build'
      no previously-included directories found matching 'docs/_output'
      adding license file 'LICENSE'
      adding license file 'licenses/LICENSE_APACHE'
      writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
      copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-aarch64-cpython-38/ba
ckports/zoneinfo
      copying src/backports/zoneinfo/py.typed -> build/lib.linux-aarch64-cpython-38/backpo
rts/zoneinfo
      running build_ext
      building 'backports.zoneinfo._czoneinfo' extension
      creating build/temp.linux-aarch64-cpython-38
      creating build/temp.linux-aarch64-cpython-38/lib
      /usr/local/aarch64-unknown-linux-gnu/bin/ccache/aarch64-unknown-linux-gnu-wrap-gcc -
pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DSYNOPLAT_F_ARMV8
 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LAR
GEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSYNO_RUNNING_DSM_BUILD_SYSTEM -g -pipe -fstack-pr
otector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=3 -O2
-Wno-unused-result -fexceptions -Wbidi-chars=ucn -fstack-clash-protection -fPIC -I/usr/syn
o/synoman/webman/3rdparty/synOCR/python3_env/include -I/usr/include/python3.8 -c lib/zonei
nfo_module.c -o build/temp.linux-aarch64-cpython-38/lib/zoneinfo_module.o -std=c99
      error: command '/usr/local/aarch64-unknown-linux-gnu/bin/ccache/aarch64-unknown-linu
x-gnu-wrap-gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for backports.zoneinfo
Failed to build backports.zoneinfo
ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproje
ct.toml-based projects
Gallaecio commented 1 year ago

It seems like an issue installing backports.zoneinfo, so not about Dateparser itself.

Either use Python 3.9+ (where that package is not needed) or find out what the issue is (maybe you are using Alpine?)

geimist commented 1 year ago

Thanks for the reply. Yes, I had almost suspected that. backports.zoneinfo could not be installed manually either. The fact that it is not needed with Python 3.9 may help me. It is a probit Linux in Synology Diskstation Manager.

geimist commented 1 year ago

Worked fine with Python 3.9. Thanks again.