stefmolin / Hands-On-Data-Analysis-with-Pandas-2nd-edition

Materials for following along with Hands-On Data Analysis with Pandas – Second Edition
https://www.amazon.com/Hands-Data-Analysis-Pandas-visualization/dp/1800563450
MIT License
577 stars 1.38k forks source link

requirements.txt problems #16

Closed leontsi closed 2 years ago

leontsi commented 2 years ago

Background information

1. Which OS are you using? windows10 pro
2. Which Python version are you using? 3.10.1
3. Are you using conda or venv? conda

Hello, The command "(book_env) C:\DA>pip3 install -r requirements.txt" works fine up until wheel (included). When it attempts to install the rest, I get the following errors (sorry for the long paste):

(book_env) C:\DA>pip3 install -r requirements.txt Collecting git+https://github.com/stefmolin/login-attempt-simulator.git@2nd_edition (from -r requirements.txt (line 15)) Cloning https://github.com/stefmolin/login-attempt-simulator.git (to revision 2nd_edition) to c:\users\leon\appdata\local\temp\pip-req-build-m7ysij9r Running command git clone --filter=blob:none --quiet https://github.com/stefmolin/login-attempt-simulator.git 'C:\Users\Leon\AppData\Local\Temp\pip-req-build-m7ysij9r' Running command git checkout -q 76e065a122343ebdd51c1cae98fbb8285411c0ff Resolved https://github.com/stefmolin/login-attempt-simulator.git to commit 76e065a122343ebdd51c1cae98fbb8285411c0ff Preparing metadata (setup.py) ... done Collecting git+https://github.com/stefmolin/ml-utils.git@2nd_edition (from -r requirements.txt (line 16)) Cloning https://github.com/stefmolin/ml-utils.git (to revision 2nd_edition) to c:\users\leon\appdata\local\temp\pip-req-build-level6 Running command git clone --filter=blob:none --quiet https://github.com/stefmolin/ml-utils.git 'C:\Users\Leon\AppData\Local\Temp\pip-req-build-level6' Running command git checkout -q 90ec708f1b9333a47c29d6b5a1fef13f409fbaea Resolved https://github.com/stefmolin/ml-utils.git to commit 90ec708f1b9333a47c29d6b5a1fef13f409fbaea Preparing metadata (setup.py) ... done Collecting git+https://github.com/stefmolin/stock-analysis.git@2nd_edition (from -r requirements.txt (line 17)) Cloning https://github.com/stefmolin/stock-analysis.git (to revision 2nd_edition) to c:\users\leon\appdata\local\temp\pip-req-build-grh5e_gd Running command git clone --filter=blob:none --quiet https://github.com/stefmolin/stock-analysis.git 'C:\Users\Leon\AppData\Local\Temp\pip-req-build-grh5e_gd' Running command git checkout -q a85af035178626c655d1ba04fd51ff6a4461a113 Resolved https://github.com/stefmolin/stock-analysis.git to commit a85af035178626c655d1ba04fd51ff6a4461a113 Preparing metadata (setup.py) ... done Processing c:\da\visual-aids Preparing metadata (setup.py) ... done Collecting graphviz==0.14.1 Using cached graphviz-0.14.1-py2.py3-none-any.whl (18 kB) Collecting imbalanced-learn==0.7.0 Using cached imbalanced_learn-0.7.0-py3-none-any.whl (167 kB) Collecting ipympl==0.6.2 Using cached ipympl-0.6.2-py2.py3-none-any.whl (105 kB) Collecting jupyterlab==3.0.4 Using cached jupyterlab-3.0.4-py3-none-any.whl (8.3 MB) Collecting matplotlib==3.3.2 Using cached matplotlib-3.3.2.tar.gz (37.9 MB) Preparing metadata (setup.py) ... done Collecting numpy==1.19.2 Using cached numpy-1.19.2.zip (7.3 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 ╰─> [208 lines of output] Running from numpy source directory. setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates run_build = parse_setuppy_commands() Processing numpy/random_bounded_integers.pxd.in Processing numpy/random\bit_generator.pyx Processing numpy/random\mtrand.pyx Processing numpy/random_bounded_integers.pyx.in Processing numpy/random_common.pyx Processing numpy/random_generator.pyx Processing numpy/random_mt19937.pyx Processing numpy/random_pcg64.pyx Processing numpy/random_philox.pyx Processing numpy/random_sfc64.pyx Cythonizing sources blas_opt_info: blas_mkl_info: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils customize MSVCCompiler libraries mkl_rt not found in ['C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64qbz5n2kfra8p0\lib', 'C:\', 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64qbz5n2kfra8p0\libs', 'C:\Users\Leon\anaconda3\Library\lib'] NOT AVAILABLE

  blis_info:
    libraries blis not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  openblas_info:
    libraries openblas not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
  get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
  customize GnuFCompiler
  Could not locate executable g77
  Could not locate executable f77
  customize IntelVisualFCompiler
  Could not locate executable ifort
  Could not locate executable ifl
  customize AbsoftFCompiler
  Could not locate executable f90
  customize CompaqVisualFCompiler
  Could not locate executable DF
  customize IntelItaniumVisualFCompiler
  Could not locate executable efl
  customize Gnu95FCompiler
  Could not locate executable gfortran
  Could not locate executable f95
  customize G95FCompiler
  Could not locate executable g95
  customize IntelEM64VisualFCompiler
  customize IntelEM64TFCompiler
  Could not locate executable efort
  Could not locate executable efc
  customize PGroupFlangCompiler
  Could not locate executable flang
  don't know how to compile Fortran code on platform 'nt'
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries tatlas not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  atlas_3_10_blas_info:
    libraries satlas not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries ptf77blas,ptcblas,atlas not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  atlas_blas_info:
    libraries f77blas,cblas,atlas not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  accelerate_info:
    NOT AVAILABLE

  C:\Users\Leon\AppData\Local\Temp\pip-install-bxaqqo62\numpy_31d83c34ea0446639cd0be372b0a4d05\numpy\distutils\system_info.py:1914: UserWarning:
      Optimized (vendor) Blas libraries are not found.
      Falls back to netlib Blas library which has worse performance.
      A better performance should be easily gained by switching
      Blas library.
    if self._calc_info(blas):
  blas_info:
    libraries blas not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  C:\Users\Leon\AppData\Local\Temp\pip-install-bxaqqo62\numpy_31d83c34ea0446639cd0be372b0a4d05\numpy\distutils\system_info.py:1914: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    if self._calc_info(blas):
  blas_src_info:
    NOT AVAILABLE

  C:\Users\Leon\AppData\Local\Temp\pip-install-bxaqqo62\numpy_31d83c34ea0446639cd0be372b0a4d05\numpy\distutils\system_info.py:1914: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    if self._calc_info(blas):
    NOT AVAILABLE

  non-existing path in 'numpy\\distutils': 'site.cfg'
  lapack_opt_info:
  lapack_mkl_info:
    libraries mkl_rt not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  openblas_lapack_info:
    libraries openblas not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  openblas_clapack_info:
    libraries openblas,lapack not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  flame_info:
    libraries flame not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries tatlas,tatlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries lapack_atlas not found in C:\
    libraries tatlas,tatlas not found in C:\
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries tatlas,tatlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries lapack_atlas not found in C:\Users\Leon\anaconda3\Library\lib
    libraries tatlas,tatlas not found in C:\Users\Leon\anaconda3\Library\lib
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

  atlas_3_10_info:
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries satlas,satlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries lapack_atlas not found in C:\
    libraries satlas,satlas not found in C:\
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries satlas,satlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries lapack_atlas not found in C:\Users\Leon\anaconda3\Library\lib
    libraries satlas,satlas not found in C:\Users\Leon\anaconda3\Library\lib
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries ptf77blas,ptcblas,atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries lapack_atlas not found in C:\
    libraries ptf77blas,ptcblas,atlas not found in C:\
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries ptf77blas,ptcblas,atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries lapack_atlas not found in C:\Users\Leon\anaconda3\Library\lib
    libraries ptf77blas,ptcblas,atlas not found in C:\Users\Leon\anaconda3\Library\lib
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

  atlas_info:
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries f77blas,cblas,atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib
    libraries lapack_atlas not found in C:\
    libraries f77blas,cblas,atlas not found in C:\
    libraries lapack_atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries f77blas,cblas,atlas not found in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\libs
    libraries lapack_atlas not found in C:\Users\Leon\anaconda3\Library\lib
    libraries f77blas,cblas,atlas not found in C:\Users\Leon\anaconda3\Library\lib
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

  lapack_info:
    libraries lapack not found in ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\lib', 'C:\\', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\\libs', 'C:\\Users\\Leon\\anaconda3\\Library\\lib']
    NOT AVAILABLE

  C:\Users\Leon\AppData\Local\Temp\pip-install-bxaqqo62\numpy_31d83c34ea0446639cd0be372b0a4d05\numpy\distutils\system_info.py:1748: 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.
    return getattr(self, '_calc_info_{}'.format(name))()
  lapack_src_info:
    NOT AVAILABLE

  C:\Users\Leon\AppData\Local\Temp\pip-install-bxaqqo62\numpy_31d83c34ea0446639cd0be372b0a4d05\numpy\distutils\system_info.py:1748: 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.
    return getattr(self, '_calc_info_{}'.format(name))()
    NOT AVAILABLE

  numpy_linalg_lapack_lite:
    FOUND:
      language = c
      define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]

  C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3056.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  running dist_info
  running build_src
  build_src
  building py_modules sources
  creating build
  creating build\src.win-amd64-3.9
  creating build\src.win-amd64-3.9\numpy
  creating build\src.win-amd64-3.9\numpy\distutils
  building library "npymath" sources
  error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
  [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.

Please let me know how to fix it. Thanks a lot, Leon

stefmolin commented 2 years ago

Hi there. Your version of Python is too high. Please review the setup instructions here as well as this pinned issue.

leontsi commented 2 years ago

Hi Stefanie, Thank you so much for your prompt reply. Running "conda create --name book_env python=3.8" has resolved the issue. Looking forward to proceeding with your book. Best regards, Leon

stefmolin commented 2 years ago

Glad you got it sorted out, Leon – happy learning :smile: