Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install error: could not build wheels #5

Open
SusanL82 opened this issue Aug 13, 2023 · 2 comments
Open

install error: could not build wheels #5

SusanL82 opened this issue Aug 13, 2023 · 2 comments

Comments

@SusanL82
Copy link

Hello,
I'm trying to install isosplit5 as a part of mountainsort4 in my anaconda environment and I run into the following error: "ERROR: Could not build wheels for isosplit5, which is required to install pyproject.toml-based projects".

I thought that perhaps the issue came from having a too new version of python (3.10) have tried to install with Python 3.8 and 3.9 aas well. All give the same issue.

I also tried to follow the pip install --use-pep517 suggestion from the first attempt, and the result is pretty much the same.
I have Visual Studio 2022 installed, so I am not sure why some of the error message seems related to that.
Do you know what the problem could be?

The result of running pip install isosplit5 is this:

(SIlatest) C:\Users\susan>pip install isosplit5
Collecting isosplit5
  Using cached isosplit5-0.2.2.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
Collecting numpy (from isosplit5)
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/69/65/0d47953afa0ad569d12de5f65d964321c208492064c38fe3b0b9744f8d44/numpy-1.24.4-cp38-cp38-win_amd64.whl.metadata
  Using cached numpy-1.24.4-cp38-cp38-win_amd64.whl.metadata (5.6 kB)
Requirement already satisfied: pybind11>=2.2 in c:\users\susan\anaconda3\envs\silatest\lib\site-packages (from isosplit5) (2.11.1)
Using cached numpy-1.24.4-cp38-cp38-win_amd64.whl (14.9 MB)
Building wheels for collected packages: isosplit5
  Building wheel for isosplit5 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [63 lines of output]
      C:\Users\susan\anaconda3\envs\SIlatest\lib\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-38
      creating build\lib.win-amd64-cpython-38\isosplit5
      copying isosplit5\__init__.py -> build\lib.win-amd64-cpython-38\isosplit5
      running build_ext
      building 'isosplit5_interface' extension
      creating build\temp.win-amd64-cpython-38
      creating build\temp.win-amd64-cpython-38\Release
      creating build\temp.win-amd64-cpython-38\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\susan\anaconda3\envs\SIlatest\lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\include -IC:\Users\susan\anaconda3\envs\SIlatest\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /EHsc /Tpsrc/isocut5.cpp /Fobuild\temp.win-amd64-cpython-38\Release\src/isocut5.obj /EHsc /DVERSION_INFO=\\\"0.2.2\\\"
      isocut5.cpp
      src/isocut5.cpp(33): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(35): warning C4244: 'argument': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(35): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(40): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(42): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(59): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(115): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(117): warning C4244: 'argument': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(117): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(122): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(124): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(141): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\susan\anaconda3\envs\SIlatest\lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\include -IC:\Users\susan\anaconda3\envs\SIlatest\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /EHsc /Tpsrc/isosplit5.cpp /Fobuild\temp.win-amd64-cpython-38\Release\src/isosplit5.obj /EHsc /DVERSION_INFO=\\\"0.2.2\\\"
      isosplit5.cpp
      src/isosplit5.cpp(210): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(220): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
      src/isosplit5.cpp(228): warning C4477: 'printf' : format string '%ld' requires an argument of type 'long', but variadic argument 1 has type 'bigint'
      src/isosplit5.cpp(228): note: consider using '%lld' in the format string
      src/isosplit5.cpp(228): note: consider using '%Id' in the format string
      src/isosplit5.cpp(228): note: consider using '%I64d' in the format string
      src/isosplit5.cpp(280): warning C4244: 'initializing': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(294): warning C4244: 'argument': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(383): warning C4244: 'argument': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(416): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
      src/isosplit5.cpp(443): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(617): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(675): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isosplit5.cpp(692): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(723): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(951): warning C4244: 'argument': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(1085): warning C4244: 'initializing': conversion from 'const __int64' to 'int', possible loss of data
      src/isosplit5.cpp(1086): warning C4244: 'initializing': conversion from 'const __int64' to 'int', possible loss of data
      src/isosplit5.cpp(1361): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(1384): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(1461): warning C4244: 'initializing': conversion from 'bigint' to 'int', possible loss of data
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\susan\anaconda3\envs\SIlatest\lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\include -IC:\Users\susan\anaconda3\envs\SIlatest\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /EHsc /Tpsrc/isosplit5_pybind11.cpp /Fobuild\temp.win-amd64-cpython-38\Release\src/isosplit5_pybind11.obj /EHsc /DVERSION_INFO=\\\"0.2.2\\\"
      isosplit5_pybind11.cpp
      c:\users\susan\anaconda3\envs\silatest\lib\site-packages\pybind11\include\pybind11\detail/common.h(147): fatal error C1189: #error:  pybind11 2.10+ requires MSVC 2017 or newer
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [end of output]

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

and then with: pip install isosplit5 --use-pep517

(SIlatest) C:\Users\susan>pip install isosplit5 --use-pep517
Collecting isosplit5
  Using cached isosplit5-0.2.2.tar.gz (22 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy (from isosplit5)
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/69/65/0d47953afa0ad569d12de5f65d964321c208492064c38fe3b0b9744f8d44/numpy-1.24.4-cp38-cp38-win_amd64.whl.metadata
  Using cached numpy-1.24.4-cp38-cp38-win_amd64.whl.metadata (5.6 kB)
Requirement already satisfied: pybind11>=2.2 in c:\users\susan\anaconda3\envs\silatest\lib\site-packages (from isosplit5) (2.11.1)
Using cached numpy-1.24.4-cp38-cp38-win_amd64.whl (14.9 MB)
Building wheels for collected packages: isosplit5
  Building wheel for isosplit5 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for isosplit5 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [53 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-38
      creating build\lib.win-amd64-cpython-38\isosplit5
      copying isosplit5\__init__.py -> build\lib.win-amd64-cpython-38\isosplit5
      running build_ext
      building 'isosplit5_interface' extension
      creating build\temp.win-amd64-cpython-38
      creating build\temp.win-amd64-cpython-38\Release
      creating build\temp.win-amd64-cpython-38\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\susan\AppData\Local\Temp\pip-build-env-laqoy9qh\normal\Lib\site-packages\pybind11\include -IC:\Users\susan\AppData\Local\Temp\pip-build-env-laqoy9qh\normal\Lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\include -IC:\Users\susan\anaconda3\envs\SIlatest\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /EHsc /Tpsrc/isocut5.cpp /Fobuild\temp.win-amd64-cpython-38\Release\src/isocut5.obj /EHsc /DVERSION_INFO=\\\"0.2.2\\\"
      isocut5.cpp
      src/isocut5.cpp(33): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(35): warning C4244: 'argument': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(35): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(40): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(42): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(59): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(115): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(117): warning C4244: 'argument': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(117): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isocut5.cpp(122): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(124): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      src/isocut5.cpp(141): warning C4244: '=': conversion from 'bigint' to 'double', possible loss of data
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\susan\AppData\Local\Temp\pip-build-env-laqoy9qh\normal\Lib\site-packages\pybind11\include -IC:\Users\susan\AppData\Local\Temp\pip-build-env-laqoy9qh\normal\Lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\include -IC:\Users\susan\anaconda3\envs\SIlatest\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /EHsc /Tpsrc/isosplit5.cpp /Fobuild\temp.win-amd64-cpython-38\Release\src/isosplit5.obj /EHsc /DVERSION_INFO=\\\"0.2.2\\\"
      isosplit5.cpp
      src/isosplit5.cpp(210): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(220): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
      src/isosplit5.cpp(228): warning C4477: 'printf' : format string '%ld' requires an argument of type 'long', but variadic argument 1 has type 'bigint'
      src/isosplit5.cpp(228): note: consider using '%lld' in the format string
      src/isosplit5.cpp(228): note: consider using '%Id' in the format string
      src/isosplit5.cpp(228): note: consider using '%I64d' in the format string
      src/isosplit5.cpp(280): warning C4244: 'initializing': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(294): warning C4244: 'argument': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(383): warning C4244: 'argument': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(416): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
      src/isosplit5.cpp(443): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(617): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(675): warning C4244: 'initializing': conversion from 'double' to 'bigint', possible loss of data
      src/isosplit5.cpp(692): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(723): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(951): warning C4244: 'argument': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(1085): warning C4244: 'initializing': conversion from 'const __int64' to 'int', possible loss of data
      src/isosplit5.cpp(1086): warning C4244: 'initializing': conversion from 'const __int64' to 'int', possible loss of data
      src/isosplit5.cpp(1361): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(1384): warning C4244: '=': conversion from 'bigint' to 'int', possible loss of data
      src/isosplit5.cpp(1461): warning C4244: 'initializing': conversion from 'bigint' to 'int', possible loss of data
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\susan\AppData\Local\Temp\pip-build-env-laqoy9qh\normal\Lib\site-packages\pybind11\include -IC:\Users\susan\AppData\Local\Temp\pip-build-env-laqoy9qh\normal\Lib\site-packages\pybind11\include -IC:\Users\susan\anaconda3\envs\SIlatest\include -IC:\Users\susan\anaconda3\envs\SIlatest\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /EHsc /Tpsrc/isosplit5_pybind11.cpp /Fobuild\temp.win-amd64-cpython-38\Release\src/isosplit5_pybind11.obj /EHsc /DVERSION_INFO=\\\"0.2.2\\\"
      isosplit5_pybind11.cpp
      c:\users\susan\appdata\local\temp\pip-build-env-laqoy9qh\normal\lib\site-packages\pybind11\include\pybind11\detail/common.h(147): fatal error C1189: #error:  pybind11 2.10+ requires MSVC 2017 or newer
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [end of output]

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

@SusanL82
Copy link
Author

Short update: I reinstalled Visual Studio and am now able to install isosplit5 on its own (pip install isosplit5),
but when I then again try to install mountainsort 4 after this, I run into the same ERROR: Could not build wheels for isosplit5, which is required to install pyproject.toml-based projects

Weirdly, I was able to install the mountainsort 4 algorithm as ml_ms4alg. But even after that, mountainsort4 tries and fails to install isosplit5. ml_ms4alg is also not recognized as a sorter by spikeinterface :(

@magland
Copy link
Collaborator

magland commented Aug 14, 2023

Thanks for the report @SusanL82 , hopefully this will be helpful to other windows users. Unfortunately I don't have easy access to a windows machine, and I've only tested the software on Linux. My recommendation would be to try using WSL. Or the docker method of SpikeInterface.
Jeremy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants