[FIXED] cannot install required dependencies into my Conda environment

Issue

the command I typed is "python3 -m pip install -r requirements.txt".

I think the first error is that the library mkl_rt is missing but I’m not sure how to add.

Complete log:

Defaulting to user installation because normal site-packages is not writeable
Collecting Flask==1.1.1
  Using cached Flask-1.1.1-py2.py3-none-any.whl (94 kB)
Collecting imutils==0.5.3
  Using cached imutils-0.5.3.tar.gz (17 kB)
  Preparing metadata (setup.py) ... done
Collecting Keras==2.4.0
  Using cached Keras-2.4.0-py2.py3-none-any.whl (170 kB)
Collecting opencv-python==4.4.0.46
  Using cached opencv-python-4.4.0.46.tar.gz (88.9 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [4837 lines of output]
      Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.9"' don't match your environment
      Collecting setuptools
        Using cached setuptools-63.4.2-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting scikit-build
        Using cached scikit_build-0.15.0-py2.py3-none-any.whl (77 kB)
      Collecting cmake
        Using cached cmake-3.24.0-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (77.9 MB)
      Collecting pip
        Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
      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'
      Collecting distro
        Using cached distro-1.7.0-py3-none-any.whl (20 kB)
      Collecting packaging
        Using cached packaging-21.3-py3-none-any.whl (40 kB)
      Collecting pyparsing!=3.0.5,>=2.0.2
        Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
      Building wheels for collected packages: numpy
        Building wheel for numpy (setup.py): started
        Building wheel for numpy (setup.py): finished with status 'error'
        error: subprocess-exited-with-error
      
        × python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [4428 lines of output]
            Running from numpy source directory.
            blas_opt_info:
            blas_mkl_info:
            customize UnixCCompiler
              libraries mkl_rt not found in ['/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib', '/usr/lib']
              NOT AVAILABLE



..............

For now I’m going to try to install the requirements with out the file.

Solution

This error occurs when there is a problem between the versions of python and /or pip vs the versions of the packages you’re trying to install.

If you know the version of python used to generate the requirements.txt file that you have, please make sure to use the same version. Otherwise try upgrading the version of python.

Answered By – ClaudiaR

Answer Checked By – Pedro (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published