madzak / python-json-logger

Json Formatter for the standard python logger
BSD 2-Clause "Simplified" License
1.7k stars 231 forks source link

Unable to install python-json-logger on macos Monterey #124

Closed Kruszylo closed 1 year ago

Kruszylo commented 2 years ago

After updating macOS to Monterey v12.0.1 (21A559) I've faced a problem while installing python-json-logger

What I wanted to do:

pipenv install python-json-logger

The output:

Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed! 
ERROR:pip.subprocessor:Command errored out with exit status 1:
 command: /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/bin/python /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/tmpkn3xf0ye
     cwd: /private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-resolver-nrvpzbk2/scipy
Complete output (213 lines):
setup.py:490: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-modern-metadata-y4tbkb34'), proceeding with generating Cython sources and expanding templates
  warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from SciPy source directory.
Cythonizing sources
Running scipy/linalg/_generate_pyx.py
Running scipy/special/_generate_pyx.py
Running scipy/stats/_generate_pyx.py
Processing scipy/cluster/_vq.pyx
Processing scipy/cluster/_optimal_leaf_ordering.pyx
Processing scipy/cluster/_hierarchy.pyx
Processing scipy/ndimage/src/_cytest.pyx
Processing scipy/ndimage/src/_ni_label.pyx
Processing scipy/linalg/cython_lapack.pyx
Processing scipy/linalg/_matfuncs_sqrtm_triu.pyx
Processing scipy/linalg/_solve_toeplitz.pyx
Processing scipy/linalg/cython_blas.pyx
Processing scipy/linalg/_decomp_update.pyx.in
Processing scipy/optimize/_group_columns.pyx
Processing scipy/optimize/_bglu_dense.pyx
Processing scipy/optimize/_trlib/_trlib.pyx
Processing scipy/optimize/_highs/cython/src/_highs_constants.pyx
Processing scipy/optimize/_highs/cython/src/_highs_wrapper.pyx
Processing scipy/optimize/_lsq/givens_elimination.pyx
Processing scipy/optimize/cython_optimize/_zeros.pyx.in
Processing scipy/io/matlab/mio_utils.pyx
Processing scipy/io/matlab/streams.pyx
Processing scipy/io/matlab/mio5_utils.pyx
Processing scipy/_lib/_ccallback_c.pyx
Processing scipy/_lib/_test_deprecation_def.pyx
Processing scipy/_lib/_test_deprecation_call.pyx
Processing scipy/_lib/messagestream.pyx
Processing scipy/special/_ufuncs_cxx.pyx
Processing scipy/special/cython_special.pyx
Processing scipy/special/_ellip_harm_2.pyx
Processing scipy/special/_comb.pyx
Processing scipy/special/_test_round.pyx
Processing scipy/special/_ufuncs.pyx
Processing scipy/fftpack/convolve.pyx
Processing scipy/interpolate/interpnd.pyx
Processing scipy/interpolate/_bspl.pyx
Processing scipy/interpolate/_ppoly.pyx
Processing scipy/sparse/_csparsetools.pyx.in
Processing scipy/sparse/csgraph/_shortest_path.pyx
Processing scipy/sparse/csgraph/_traversal.pyx
Processing scipy/sparse/csgraph/_flow.pyx
Processing scipy/sparse/csgraph/_tools.pyx
Processing scipy/sparse/csgraph/_matching.pyx
Processing scipy/sparse/csgraph/_reordering.pyx
Processing scipy/sparse/csgraph/_min_spanning_tree.pyx
Processing scipy/spatial/ckdtree.pyx
Processing scipy/spatial/_voronoi.pyx
Processing scipy/spatial/_hausdorff.pyx
Processing scipy/spatial/qhull.pyx
Processing scipy/spatial/transform/rotation.pyx
Processing scipy/signal/_max_len_seq_inner.pyx
Processing scipy/signal/_peak_finding_utils.pyx
Processing scipy/signal/_upfirdn_apply.pyx
Processing scipy/signal/_spectral.pyx
Processing scipy/signal/_sosfilt.pyx
Processing scipy/stats/_stats.pyx
warning: _cython_special_custom.pxi:9:8: Unreachable code
warning: _cython_special_custom.pxi:13:4: Unreachable code
warning: _cython_special_custom.pxi:21:8: Unreachable code
warning: _cython_special_custom.pxi:25:4: Unreachable code
warning: _cython_special_custom.pxi:33:8: Unreachable code
warning: _cython_special_custom.pxi:37:4: Unreachable code
warning: _cython_special_custom.pxi:45:8: Unreachable code
warning: _cython_special_custom.pxi:49:4: Unreachable code
Processing scipy/stats/_qmc_cy.pyx
Processing scipy/stats/_sobol.pyx
Processing scipy/stats/biasedurn.pyx
Processing scipy/stats/_boost/src/beta_ufunc.pyx
Processing scipy/stats/_boost/src/nbinom_ufunc.pyx
Processing scipy/stats/_boost/src/binom_ufunc.pyx
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
  libraries mkl_rt not found in ['/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib', '/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
  libraries openblas not found in ['/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib', '/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
  libraries openblas,lapack not found in ['/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib', '/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

flame_info:
customize UnixCCompiler
  libraries flame not found in ['/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib', '/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
  libraries lapack_atlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries tatlas,tatlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries tatlas,tatlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
  NOT AVAILABLE

atlas_3_10_info:
customize UnixCCompiler
  libraries lapack_atlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries satlas,satlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries satlas,satlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
  libraries lapack_atlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries ptf77blas,ptcblas,atlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
customize UnixCCompiler
  libraries lapack_atlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries f77blas,cblas,atlas not found in /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries f77blas,cblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

accelerate_info:
  NOT AVAILABLE

lapack_info:
customize UnixCCompiler
  libraries lapack not found in ['/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib', '/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

/private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-build-env-z7coqu2l/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:1712: UserWarning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  if getattr(self, '_calc_info_{}'.format(lapack))():
lapack_src_info:
  NOT AVAILABLE

/private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-build-env-z7coqu2l/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:1712: UserWarning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  if getattr(self, '_calc_info_{}'.format(lapack))():
  NOT AVAILABLE

Traceback (most recent call last):
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py", line 257, in <module>
    main()
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py", line 240, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
    return hook(metadata_directory, config_settings)
  File "/private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-build-env-z7coqu2l/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
    self.run_setup()
  File "/private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-build-env-z7coqu2l/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 258, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-build-env-z7coqu2l/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 629, in <module>
    setup_package()
  File "setup.py", line 625, in setup_package
    setup(**metadata)
  File "/private/var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/pip-build-env-z7coqu2l/overlay/lib/python3.8/site-packages/numpy/distutils/core.py", line 137, in setup
    config = configuration()
  File "setup.py", line 528, in configuration
    raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. Note: Accelerate is no longer supported.
To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
See site.cfg.example in the Scipy source directory and
https://docs.scipy.org/doc/scipy/reference/building/index.html for details.
----------------------------------------
Traceback (most recent call last):
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/resolver.py", line 764, in <module>
    main()
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/resolver.py", line 758, in main
    _main(parsed.pre, parsed.clear, parsed.verbose, parsed.system, parsed.write,
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/resolver.py", line 741, in _main
    resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/resolver.py", line 702, in resolve_packages
    results, resolver = resolve(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/resolver.py", line 684, in resolve
    return resolve_deps(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/utils.py", line 1397, in resolve_deps
    results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/utils.py", line 1110, in actually_resolve_deps
    resolver.resolve()
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/utils.py", line 825, in resolve
    results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/piptools/resolver.py", line 180, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/piptools/resolver.py", line 268, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/piptools/resolver.py", line 383, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 229, in get_dependencies
    legacy_results = self.get_legacy_dependencies(ireq)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 350, in get_legacy_dependencies
    results, ireq = self.resolve_reqs(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 306, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/legacy_resolve.py", line 339, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/legacy_resolve.py", line 287, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 508, in prepare_linked_requirement
    abstract_dist = _get_prepared_distribution(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 95, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/distributions/sdist.py", line 40, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 564, in prepare_metadata
    self.metadata_directory = self._generate_metadata()
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 549, in _generate_metadata
    return generate_metadata(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/operations/build/metadata.py", line 36, in generate_metadata
    distinfo_dir = backend.prepare_metadata_for_build_wheel(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/pep517/wrappers.py", line 167, in prepare_metadata_for_build_wheel
    return self._call_hook('prepare_metadata_for_build_wheel', {
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/pep517/wrappers.py", line 245, in _call_hook
    self._subprocess_runner(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/utils/subprocess.py", line 271, in runner
    call_subprocess(
  File "/Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/utils/subprocess.py", line 242, in call_subprocess
    raise InstallationError(exc_msg)
pipenv.patched.notpip._internal.exceptions.InstallationError: Command errored out with exit status 1: /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/bin/python /Users/maksymtitov/.local/share/virtualenvs/my-project-1rW-42Tr/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/4w/n9x572cx4z52knp3xjqm6ffm0000gn/T/tmpkn3xf0ye Check the logs for full command output.

What I tried to do:

pip install -U pip     
pip install --upgrade pipenv           
brew install openblas
export LDFLAGS="-L/usr/local/opt/openblas/lib"
export CPPFLAGS="-I/usr/local/opt/openblas/include"
brew install python

What worked for me:

SYSTEM_VERSION_COMPAT=1 pipenv install python-json-logger