abess-team/abess

Failed to build abess

DO891 opened this issue · 2 comments

DO891 commented

Describe the bug

A clear and concise description of what the bug is.

Code for Reproduction

Paste your code for reproducing the bug:

C:\Users\DO>pip install abess
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting abess
Using cached https://mirrors.aliyun.com/pypi/packages/3b/6c/edfdb68a7aaaadc3ae362167a039521188f607e2c7ab9910bbbb5025b365/abess-0.4.7.tar.gz (1.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from abess) (1.25.0)
Requirement already satisfied: pandas in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from abess) (2.0.3)
Requirement already satisfied: scipy in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from abess) (1.11.2)
Requirement already satisfied: scikit-learn>=0.24 in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from abess) (1.3.1)
Requirement already satisfied: joblib>=1.1.1 in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from scikit-learn>=0.24->abess) (1.3.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from scikit-learn>=0.24->abess) (3.2.0)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from pandas->abess) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from pandas->abess) (2023.3)
Requirement already satisfied: tzdata>=2022.1 in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from pandas->abess) (2023.3)
Requirement already satisfied: six>=1.5 in c:\users\do\appdata\local\programs\python\python311\lib\site-packages (from python-dateutil>=2.8.2->pandas->abess) (1.16.0)
Building wheels for collected packages: abess
Building wheel for abess (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for abess (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [106 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\abess
copying abess\bess_base.py -> build\lib.win-amd64-cpython-311\abess
copying abess\datasets.py -> build\lib.win-amd64-cpython-311\abess
copying abess\decomposition.py -> build\lib.win-amd64-cpython-311\abess
copying abess\functions.py -> build\lib.win-amd64-cpython-311\abess
copying abess\linear.py -> build\lib.win-amd64-cpython-311\abess
copying abess\pca.py -> build\lib.win-amd64-cpython-311\abess
copying abess\utilities.py -> build\lib.win-amd64-cpython-311\abess
copying abess_init_.py -> build\lib.win-amd64-cpython-311\abess
running build_ext
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The CXX compiler identification is MSVC 19.38.33134.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/C++/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:20 (find_package):
By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pybind11",
but CMake did not find one.

    Could not find a package configuration file provided by "pybind11" with any
    of the following names:

      pybind11Config.cmake
      pybind11-config.cmake

    Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
    "pybind11_DIR" to a directory containing one of the above files.  If
    "pybind11" provides a separate development package or SDK, be sure it has
    been installed.


  -- Found OpenMP_CXX: -openmp (found version "2.0")
  -- Found OpenMP: TRUE (found version "2.0")
  CMake Error at CMakeLists.txt:46 (pybind11_extension):
    Unknown CMake command "pybind11_extension".


  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "C:\Users\DO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\DO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\DO\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\build_meta.py", line 404, in build_wheel
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\build_meta.py", line 389, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 173, in <module>
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 88, in run
      _build_ext.run(self)
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "C:\Users\DO\AppData\Local\Temp\pip-build-env-_yipzd9n\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "<string>", line 122, in build_extension
    File "C:\Users\DO\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\DO\\AppData\\Local\\Temp\\pip-install-lvsnyqo0\\abess_959f6858bbdc4763abddfdcef50ee4ab', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\DO\\AppData\\Local\\Temp\\pip-install-lvsnyqo0\\abess_959f6858bbdc4763abddfdcef50ee4ab\\build\\lib.win-amd64-cpython-311\\abess\\', '-DPYTHON_EXECUTABLE=C:\\Users\\DO\\AppData\\Local\\Programs\\Python\\Python311\\python.exe', '-DCMAKE_BUILD_TYPE=Release', '-DMSVC=ON', '-A', 'x64', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\DO\\AppData\\Local\\Temp\\pip-install-lvsnyqo0\\abess_959f6858bbdc4763abddfdcef50ee4ab\\build\\lib.win-amd64-cpython-311\\abess\\']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for abess
Failed to build abess
ERROR: Could not build wheels for abess, which is required to install pyproject.toml-based projects

your R code


or 

```python
# your Python code

Expected behavior

A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • R/Python Version [e.g. 3.6.3]
  • Package Version [e.g. 0.3.0]

You can get the information from Python via running:

import platform
print("Platform Version: {0}, {1}".format(platform.platform(), platform.architecture()[0]))
print("Python Version:", platform.python_version())
import abess
print("Package Version:", abess.__version__)

And from R via running:

R.version
packageVersion("abess")

Screenshots

If needed, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

DO891 commented

ERROR: Could not build wheels for abess, which is required to install pyproject.toml-based projects

DO891 commented

直接考虑用conda建虚拟环境,解决。