lap: Failed to install through pip install lap
Hi, thank you for providing this project! I was excited to see that it supports matrices with differing cardinalities. Though the installation sadly didn’t work. Is there a way to resolve this?
My machine runs OS X Monterey 12.5 on an intel processor. Here are the logs:
~ % pip3 install lap Collecting lap Using cached lap-0.4.0.tar.gz (1.5 MB) Preparing metadata (setup.py) … done Installing collected packages: lap DEPRECATION: lap 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 lap … error error: subprocess-exited-with-error
× Running setup.py install for lap did not run successfully. │ exit code: 1 ╰─> [124 lines of output] Partial import of lap during the build process. /private/var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/pip-install-2x4d_xr1/lap_13af42b2b7e649638abf7c3f7c571b5d/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 /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/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.macosx-10.9-universal2-cpython-311 creating build/lib.macosx-10.9-universal2-cpython-311/lap copying lap/__init__.py -> build/lib.macosx-10.9-universal2-cpython-311/lap copying lap/lapmod.py -> build/lib.macosx-10.9-universal2-cpython-311/lap running build_ext INFO: customize UnixCCompiler INFO: customize UnixCCompiler using build_ext WARN: CCompilerOpt.__init__[1016] : unable to detect CPU architecture which lead to disable the optimization. check dist_info:<< ('macosx-10.9-universal2', 'clang', '-Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math') >> INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-march=native) INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11 creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11 creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils creating /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils/checks INFO: compile options: '-I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c' extra options: '-march=native' WARN: CCompilerOpt.dist_test[630] : CCompilerOpt._dist_test_spawn[764] : Command (clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils/checks/test_flags.c -o /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils/checks/test_flags.o -MMD -MF /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils/checks/test_flags.o.d -march=native) failed with exit status 1 output -> clang: error: the clang compiler does not support '-march=native' WARN: CCompilerOpt.cc_test_flags[1081] : testing failed INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-O3) INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math INFO: compile options: '-I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c' extra options: '-O3' INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-Werror=switch) INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math INFO: compile options: '-I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c' extra options: '-Werror=switch' INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-Werror) INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math INFO: compile options: '-I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c' extra options: '-Werror' WARN: CCompilerOpt.dist_test[630] : CCompilerOpt._dist_test_spawn[764] : Command (clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils/checks/test_flags.c -o /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils/checks/test_flags.o -MMD -MF /var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/tmpq94prdf8/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/distutils/checks/test_flags.o.d -Werror) failed with exit status 1 output -> error: overriding currently unsupported use of floating point exceptions on this target [-Werror,-Wunsupported-floating-point-opt] 1 error generated. WARN: CCompilerOpt.cc_test_flags[1081] : testing failed INFO: CCompilerOpt.__init__[1786] : check requested baseline INFO: CCompilerOpt.__init__[1795] : check requested dispatch-able features INFO: CCompilerOpt.__init__[1811] : initialize targets groups INFO: CCompilerOpt.__init__[1813] : parse target group simd_test INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VSX FMA4 NEON ASIMD VX AVX512F VSX2 XOP VXE2 VSX3 SSE42 (FMA3 AVX2) AVX512_SKX SSE2 VXE VSX4) not part of baseline or dispatch-able features INFO: CCompilerOpt.generate_dispatch_header[2357] : generate CPU dispatch header: (build/src.macosx-10.9-universal2-3.11/numpy/distutils/include/npy_cpu_dispatch_config.h) WARN: CCompilerOpt.generate_dispatch_header[2366] : dispatch header dir build/src.macosx-10.9-universal2-3.11/numpy/distutils/include does not exist, creating it INFO: customize UnixCCompiler WARN: #### ['clang', '-Wsign-compare', '-Wunreachable-code', '-fno-common', '-dynamic', '-DNDEBUG', '-g', '-fwrapv', '-O3', '-Wall', '-arch', 'arm64', '-arch', 'x86_64', '-g'] ####### INFO: customize UnixCCompiler using build_ext INFO: building 'lap._lapjv' extension INFO: compiling C++ sources INFO: C compiler: clang++ -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math creating build/temp.macosx-10.9-universal2-cpython-311/lap INFO: compile options: '-I/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/core/include -Ilap -I/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c' INFO: clang++: lap/_lapjv.cpp INFO: clang++: lap/lapmod.cpp INFO: clang++: lap/lapjv.cpp warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt] warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt] warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt] 1 warning generated. lap/_lapjv.cpp:181:12: fatal error: 'longintrepr.h' file not found #include "longintrepr.h" ^~~~~~~~~~~~~~~ 1 warning generated. 1 warning and 1 error generated. error: Command "clang++ -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ftrapping-math -I/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/core/include -Ilap -I/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c lap/_lapjv.cpp -o build/temp.macosx-10.9-universal2-cpython-311/lap/_lapjv.o -MMD -MF build/temp.macosx-10.9-universal2-cpython-311/lap/_lapjv.o.d" failed with exit status 1 INFO: ########### EXT COMPILER OPTIMIZATION ########### INFO: Platform : Architecture: unsupported Compiler : clang CPU baseline : Requested : optimization disabled Enabled : none Flags : none Extra checks: none Requested : optimization disabled CPU dispatch : Enabled : none Generated : none INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /private/var/folders/hf/hz17cj_d51v8140lh19jkwg80000gn/T/pip-install-2x4d_xr1/lap_13af42b2b7e649638abf7c3f7c571b5d/build/temp.macosx-10.9-universal2-cpython-311/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.
Thanks in advance
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 15
Try: pip install lapx
Got sick of this issue so here you go! Just copy the two sub folders lap and lap dist into your site packages folder https://github.com/Adnedvid/Lap-pkg-for-YOLO.git
IT works brooooo. Thanks so much