I was trying to install lap for object detection but i cloud not do it.
I have try to installed it on python version 9 , 10 and 11 also but i cant do it
I am learning object detection from Murtaza's Workshop - Robotics and AI.
or is there any way to fix this problem
C:\\Users\\ACER\\Desktop\\Object-Detection-Yolo\\venv39\\Scripts\\activate.bat
pip install lap==0.4.0
the error:
Collecting lap==0.4.0
Using cached lap-0.4.0.tar.gz (1.5 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: lap
Building wheel for lap (setup.py): started
Building wheel for lap (setup.py): finished with status 'error'
Running setup.py clean for lap
Failed to build lap
Installing collected packages: lap
Running setup.py install for lap: started
Running setup.py install for lap: finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[39 lines of output]
Partial import of lap during the build process.
C:\Users\ACER\AppData\Local\Temp\pip-install-a82najcq\lap_e14dabff97d544e59d3633db1f44d15e\setup.py:223: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.core import setup
Generating cython files
running bdist_wheel
running build
running config_cc
INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building extension "lap._lapjv" sources
INFO: building data_files sources
INFO: build_src: building npy-pkg config files
C:\Users\ACER\Desktop\Object-Detection-Yolo\venv39\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_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\lap
copying lap\lapmod.py -> build\lib.win-amd64-cpython-39\lap
copying lap\__init__.py -> build\lib.win-amd64-cpython-39\lap
running build_ext
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
INFO: customize MSVCCompiler using build_ext
INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (/O2)
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/
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> C:\Users\ACER\AppData\Local\Temp\pip-install-a82najcq\lap_e14dabff97d544e59d3633db1f44d15e\build\temp.win-amd64-cpython-39\Release\ccompiler_opt_cache_ext.py
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lap
error: subprocess-exited-with-error
Running setup.py install for lap did not run successfully.
exit code: 1
[39 lines of output]
Partial import of lap during the build process.
C:\Users\ACER\AppData\Local\Temp\pip-install-a82najcq\lap_e14dabff97d544e59d3633db1f44d15e\setup.py:223: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.core import setup
Generating cython files
running install
C:\Users\ACER\Desktop\Object-Detection-Yolo\venv39\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
INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building extension "lap._lapjv" sources
INFO: building data_files sources
INFO: build_src: building npy-pkg config files
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\lap
copying lap\lapmod.py -> build\lib.win-amd64-cpython-39\lap
copying lap\__init__.py -> build\lib.win-amd64-cpython-39\lap
running build_ext
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
INFO: customize MSVCCompiler using build_ext
INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (/O2)
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/
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> C:\Users\ACER\AppData\Local\Temp\pip-install-a82najcq\lap_e14dabff97d544e59d3633db1f44d15e\build\temp.win-amd64-cpython-39\Release\ccompiler_opt_cache_ext.py
[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.
lap
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip