gatagat / lap

Linear Assignment Problem solver (LAPJV/LAPMOD).
BSD 2-Clause "Simplified" License
211 stars 66 forks source link

installation error #43

Open DevindiSiwurathna opened 1 year ago

DevindiSiwurathna commented 1 year ago

Collecting lap Using cached lap-0.4.0.tar.gz (1.5 MB) Building wheels for collected packages: lap Building wheel for lap (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\setup.py'"'"'; file='"'"'C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\USER\AppData\Local\Temp\pip-wheel-586napi7' cwd: C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\ Complete output (37 lines): Partial import of lap during the build process. C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\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 running build_py creating build creating build\lib.win-amd64-3.9 creating build\lib.win-amd64-3.9\lap copying lap\lapmod.py -> build\lib.win-amd64-3.9\lap copying lap__init__.py -> build\lib.win-amd64-3.9\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[1073] : testing flags (/O2) error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/ INFO: CCompilerOpt.cache_flush[857] : write cache to path -> C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\build\temp.win-amd64-3.9\Release\ccompiler_opt_cache_ext.py

ERROR: Failed building wheel for lap Running setup.py clean for lap Failed to build lap Installing collected packages: lap Running setup.py install for lap ... error ERROR: Command errored out with exit status 1: command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\setup.py'"'"'; file='"'"'C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\USER\AppData\Local\Temp\pip-record-2_f3phsd\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python39\Include\lap' cwd: C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\ Complete output (37 lines): Partial import of lap during the build process. C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\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
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-3.9
creating build\lib.win-amd64-3.9\lap
copying lap\lapmod.py -> build\lib.win-amd64-3.9\lap
copying lap\__init__.py -> build\lib.win-amd64-3.9\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[1073] : testing flags (/O2)
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\build\temp.win-amd64-3.9\Release\ccompiler_opt_cache_ext.py
----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\setup.py'"'"'; file='"'"'C:\Users\USER\AppData\Local\Temp\pip-install-n2v7wwew\lap\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\USER\AppData\Local\Temp\pip-record-2_f3phsd\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python39\Include\lap' Check the logs for full command output.

shotofcovfefe commented 1 year ago

Also facing this issue.

dave-andersen commented 1 year ago

This is due to a recent change in setuputils that has broken a lot of packages: https://github.com/pypa/setuptools/issues/3693

(it affected us as well.). The solution appears to be to stop using distutils, unfortunately.

bendahouwael commented 1 year ago

To solve this problem you got to install the Microsoft Visual C++ 14.0 + tools from Visual Studio Build Tools.

septialeyda commented 1 year ago

I edited the file setup.py, there are some path in 'open' part that can't be read (i replace the file with complete path and add '\' so the slash in the path turn to '\') and i changed license_file in setupcfg.py to license_files

varadtechx commented 1 year ago

Me too . Its the same issue with I am facing .

Phakorn-Ando commented 11 months ago

omg i also have same problem