dffml icon indicating copy to clipboard operation
dffml copied to clipboard

service: dev: install: scipy 1.4.1 pip installation blows up

Open mhash1m opened this issue 2 years ago • 1 comments

Python3.9 Venv scipy 1.4.1

I've recreated the issue faced by some new folks. As pointed out by @programmer290399 it could just be caused by Python3.9. However, this is simply solved by removing the pin at 1.4.1 and installing 1.8.0 instead. I don't see any other errors in installation at least. ping @pdxjohnny

Collecting scipy==1.4.1
  Using cached scipy-1.4.1.tar.gz (24.6 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [139 lines of output]
      setup.py:418: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/n2/9fqgxn9906g60fqj_jb_xk4c0000gn/T/pip-modern-metadata-19syt_9j'), proceeding with generating Cython sources and expanding templates
        warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
      Running from scipy source directory.
      lapack_opt_info:
      lapack_mkl_info:
      customize UnixCCompiler
        libraries mkl_rt not found in ['/Users/hashimchaudry/dffml/.venv/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE
      
      openblas_lapack_info:
      customize UnixCCompiler
      customize UnixCCompiler
        libraries openblas not found in ['/Users/hashimchaudry/dffml/.venv/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE
      
      openblas_clapack_info:
      customize UnixCCompiler
      customize UnixCCompiler
        libraries openblas,lapack not found in ['/Users/hashimchaudry/dffml/.venv/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE
      
      flame_info:
      customize UnixCCompiler
        libraries flame not found in ['/Users/hashimchaudry/dffml/.venv/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/hashimchaudry/dffml/.venv/lib
      customize UnixCCompiler
        libraries tatlas,tatlas not found in /Users/hashimchaudry/dffml/.venv/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/hashimchaudry/dffml/.venv/lib
      customize UnixCCompiler
        libraries satlas,satlas not found in /Users/hashimchaudry/dffml/.venv/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/hashimchaudry/dffml/.venv/lib
      customize UnixCCompiler
        libraries ptf77blas,ptcblas,atlas not found in /Users/hashimchaudry/dffml/.venv/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/hashimchaudry/dffml/.venv/lib
      customize UnixCCompiler
        libraries f77blas,cblas,atlas not found in /Users/hashimchaudry/dffml/.venv/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/hashimchaudry/dffml/.venv/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE
      
      /private/var/folders/n2/9fqgxn9906g60fqj_jb_xk4c0000gn/T/pip-build-env-ez06qzzw/overlay/lib/python3.9/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/n2/9fqgxn9906g60fqj_jb_xk4c0000gn/T/pip-build-env-ez06qzzw/overlay/lib/python3.9/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/hashimchaudry/dffml/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/Users/hashimchaudry/dffml/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/hashimchaudry/dffml/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/n2/9fqgxn9906g60fqj_jb_xk4c0000gn/T/pip-build-env-ez06qzzw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 188, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/n2/9fqgxn9906g60fqj_jb_xk4c0000gn/T/pip-build-env-ez06qzzw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 281, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/n2/9fqgxn9906g60fqj_jb_xk4c0000gn/T/pip-build-env-ez06qzzw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 540, in <module>
          setup_package()
        File "setup.py", line 536, in setup_package
          setup(**metadata)
        File "/private/var/folders/n2/9fqgxn9906g60fqj_jb_xk4c0000gn/T/pip-build-env-ez06qzzw/overlay/lib/python3.9/site-packages/numpy/distutils/core.py", line 137, in setup
          config = configuration()
        File "setup.py", line 435, in configuration
          raise NotFoundError(msg)
      numpy.distutils.system_info.NotFoundError: No lapack/blas resources found. Note: Accelerate is no longer supported.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Traceback (most recent call last):
  File "/Users/hashimchaudry/dffml/.venv/bin/dffml", line 33, in <module>
    sys.exit(load_entry_point('dffml', 'console_scripts', 'dffml')())
  File "/Users/hashimchaudry/dffml/dffml/util/cli/cmd.py", line 272, in main
    result = loop.run_until_complete(cls._main(*argv[1:]))
  File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/Users/hashimchaudry/dffml/dffml/util/cli/cmd.py", line 238, in _main
    return await cls.cli(*args)
  File "/Users/hashimchaudry/dffml/dffml/util/cli/cmd.py", line 224, in cli
    return await cmd.do_run()
  File "/Users/hashimchaudry/dffml/dffml/util/cli/cmd.py", line 203, in do_run
    return await self.run()
  File "/Users/hashimchaudry/dffml/dffml/service/dev.py", line 454, in run
    raise RuntimeError(f"pip failed to install: {','.join(failed)}")
RuntimeError: pip failed to install: 

mhash1m avatar Mar 15 '22 13:03 mhash1m

What I think happened here is this 1.4.1 scipy release is from 2019, so they might not have a wheel for this in python 3.9 which was released in 2020, thus it switched to compiling it from the source distribution, and the target machine didn't have a Fortran compiler and scipy has a decent chunk of it's code written in it, thus it fails to compile and all hell breaks loose

programmer290399 avatar Mar 15 '22 15:03 programmer290399