1

I was setting up a program using python. I think some modules are missing. Can someone help me correct the dependencies? I'm currently using python3.11 on Windows 10.

I tried to run pip install -r requirements.txt but it returns this error:
I used (...) to shorten the error.

Collecting websockets==8.1
  Using cached websockets-8.1.tar.gz (58 kB)
  Preparing metadata (setup.py) ... done
Collecting tqdm==4.31.1
  Using cached tqdm-4.31.1-py2.py3-none-any.whl (48 kB)
Collecting pandas==1.1.2
  Using cached pandas-1.1.2.tar.gz (5.2 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [315 lines of output]
      Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
      Collecting setuptools
        Using cached setuptools-65.5.1-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.38.2-py3-none-any.whl (36 kB)
      Collecting Cython<3,>=0.29.16
        Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
      Collecting numpy==1.17.3
        Using cached numpy-1.17.3.zip (6.4 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Installing collected packages: wheel, setuptools, numpy, Cython
        DEPRECATION: numpy is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
        Running setup.py install for numpy: started
        Running setup.py install for numpy: finished with status 'error'
        error: subprocess-exited-with-error

        Running setup.py install for numpy did not run successfully.
        exit code: 1

        [279 lines of output]
        Running from numpy source directory.

        Note: if you need reliable uninstall behavior, then install
        with pip instead of using `setup.py install`:

          - `pip install .`       (from a git repo or downloaded source
                                   release)
          - `pip install numpy`   (last NumPy release on PyPi)


        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:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
          NOT AVAILABLE

        blis_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries blis not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
          NOT AVAILABLE

        openblas_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries openblas not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
        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
(...)
        atlas_3_10_blas_threads_info:
        Setting PTATLAS=ATLAS
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries tatlas not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
          NOT AVAILABLE
(...)

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [315 lines of output]
      Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
      Collecting setuptools
        Using cached setuptools-65.5.1-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.38.2-py3-none-any.whl (36 kB)
      Collecting Cython<3,>=0.29.16
        Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
      Collecting numpy==1.17.3
        Using cached numpy-1.17.3.zip (6.4 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Installing collected packages: wheel, setuptools, numpy, Cython
        DEPRECATION: numpy is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
        Running setup.py install for numpy: started
        Running setup.py install for numpy: finished with status 'error'
        error: subprocess-exited-with-error

        Running setup.py install for numpy did not run successfully.
        exit code: 1

        [279 lines of output]
        Running from numpy source directory.

        Note: if you need reliable uninstall behavior, then install
        with pip instead of using `setup.py install`:

          - `pip install .`       (from a git repo or downloaded source
                                   release)
          - `pip install numpy`   (last NumPy release on PyPi)


        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:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
          NOT AVAILABLE

        blis_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries blis not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
          NOT AVAILABLE

        openblas_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries openblas not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
        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
(...)
        C:\Users\user\AppData\Local\Temp\pip-install-q6qg404u\numpy_4eb1db888ba3499b83b89bb3bed687e2\numpy\distutils\system_info.py:690: 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.
          self.calc_info()
        blas_src_info:
          NOT AVAILABLE

        openblas_lapack_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries openblas not found in ['C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\lib', 'C:\\', 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python311\\libs']
          NOT AVAILABLE

(...)

        C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py:264: UserWarning: Unknown distribution option: 'define_macros'
          warnings.warn(msg)
        running install
        C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        running build
        running config_cc
        unifing config_cc, config, build_clib, build_ext, build commands --compiler options
        running config_fc
        unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
        running build_src
        build_src
        building py_modules sources
        creating build
        creating build\src.win-amd64-3.1
        creating build\src.win-amd64-3.1\numpy
        creating build\src.win-amd64-3.1\numpy\distutils
        building library "npymath" sources
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
        [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure

      Encountered error while trying to install package.

      numpy

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
DarkShade
  • 31
  • 3
  • I have not checked, but maybe `numpy` is not ready for Python 3.11 yet. Python 3.11 got released just a few days ago (2022-10-24). You could downgrade to Python 3.10 and try again. – sinoroc Nov 06 '22 at 10:31
  • @sinoroc I don't think that would solve the problem. I tried to run it with Python 3.9 before running it on Python 3.11 which still resulted in the same error. So downgrading Python is not gonna solve it I guess. – DarkShade Nov 08 '22 at 15:19
  • Does this answer your question? [How to solve "error: Microsoft Visual C++ 14.0 or greater is required" when installing Python packages?](https://stackoverflow.com/questions/64261546/how-to-solve-error-microsoft-visual-c-14-0-or-greater-is-required-when-inst) – pigrammer Nov 10 '22 at 02:26

0 Answers0