magland / mountainsort4

MountainSort4 spike sorting algorithm
6 stars 4 forks source link

error with mountainsort4 installation #7

Open kshtjkumar opened 11 months ago

kshtjkumar commented 11 months ago

Hi I am trying to install mountainsort4, however I am getting the following error:

ERROR: Failed building wheel for isosplit5 ERROR: Could not build wheels for isosplit5, which is required to install pyproject.toml-based projects

Any help with this ?

JoeZiminski commented 11 months ago

Hi @kshtjkumar are you on macOS? I believe there are some compile problems for older isosplit versions on macOS. If you are on macOS, are you able to use mountainsort5? This uses isosplit6 in which these problems should be resolved. If you are not on macOS the problem might have a difference cause.

kshtjkumar commented 11 months ago

hi @JoeZiminski , No am using windows OS.

JoeZiminski commented 11 months ago

In that case sorry I'm not sure why, but @magland may well know

magland commented 11 months ago

@kshtjkumar Could you provide the complete error log please?

kshtjkumar commented 11 months ago

@magland here you go: Collecting mountainsort4 Using cached mountainsort4-1.0.4-py3-none-any.whl Requirement already satisfied: dask in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from mountainsort4) (2023.4.1) Collecting pybind11 (from mountainsort4) Using cached pybind11-2.11.1-py3-none-any.whl (227 kB) Collecting isosplit5==0.1.3 (from mountainsort4) Using cached isosplit5-0.1.3.tar.gz (17 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: numpy in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from mountainsort4) (1.24.3) Requirement already satisfied: h5py in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from mountainsort4) (3.8.0) Requirement already satisfied: scikit-learn in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from mountainsort4) (1.2.2) Requirement already satisfied: spikeextractors>=0.9.5 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from mountainsort4) (0.9.11) Requirement already satisfied: tqdm in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from spikeextractors>=0.9.5->mountainsort4) (4.65.0) Requirement already satisfied: joblib in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from spikeextractors>=0.9.5->mountainsort4) (1.2.0) Requirement already satisfied: click>=8.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (8.0.4) Requirement already satisfied: cloudpickle>=1.5.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (2.2.1) Requirement already satisfied: fsspec>=2021.09.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (2023.4.0) Requirement already satisfied: packaging>=20.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (23.0) Requirement already satisfied: partd>=1.2.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (1.4.0) Requirement already satisfied: pyyaml>=5.3.1 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (6.0) Requirement already satisfied: toolz>=0.10.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (0.12.0) Requirement already satisfied: importlib-metadata>=4.13.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from dask->mountainsort4) (6.0.0) Requirement already satisfied: scipy>=1.3.2 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from scikit-learn->mountainsort4) (1.9.1) Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from scikit-learn->mountainsort4) (3.1.0) Requirement already satisfied: colorama in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from click>=8.0->dask->mountainsort4) (0.4.6) Requirement already satisfied: zipp>=0.5 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from importlib-metadata>=4.13.0->dask->mountainsort4) (3.11.0) Requirement already satisfied: locket in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from partd>=1.2.0->dask->mountainsort4) (1.0.0) Building wheels for collected packages: isosplit5 Building wheel for isosplit5 (setup.py): started Building wheel for isosplit5 (setup.py): finished with status 'error' Running setup.py clean for isosplit5 Failed to build isosplit5 Note: you may need to restart the kernel to use updated packages.

error: subprocess-exited-with-error

python setup.py bdist_wheel did not run successfully. exit code: 1

[69 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-39 creating build\lib.win-amd64-cpython-39\isosplit5 copying isosplit5__init.py -> build\lib.win-amd64-cpython-39\isosplit5 running build_ext building 'isosplit5_interface' extension Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\dlabi\AppData\Local\Temp\pip-install-cc_7o3fh\isosplit5_2040a75061a44cb49aa8c5c954881ce5\setup.py", line 88, in setup( File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools__init__.py", line 107, in setup return distutils.core.setup(**attrs) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\core.py", line 185, in setup return run_commands(dist) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands dist.run_commands() File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\dist.py", line 969, in run_commands self.run_command(cmd) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools\dist.py", line 1244, in run_command super().run_command(command) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command cmd_obj.run() File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\wheel\bdist_wheel.py", line 325, in run self.run_command("build") File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools\dist.py", line 1244, in run_command super().run_command(command) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command cmd_obj.run() File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\command\build.py", line 131, in run self.run_command(cmd_name) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools\dist.py", line 1244, in run_command super().run_command(command) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command cmd_obj.run() File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools\command\build_ext.py", line 84, in run _build_ext.run(self) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 345, in run self.build_extensions() File "C:\Users\dlabi\AppData\Local\Temp\pip-install-cc_7o3fh\isosplit5_2040a75061a44cb49aa8c5c954881ce5\setup.py", line 83, in build_extensions build_ext.build_extensions(self) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools\command\build_ext.py", line 246, in build_extension _build_ext.build_extension(self, ext) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 548, in build_extension objects = self.compiler.compile( File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils_msvccompiler.py", line 344, in compile compile_info = self._setup_compile( File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\ccompiler.py", line 348, in _setup_compile pp_opts = gen_preprocess_options(macros, incdirs) File "C:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\setuptools_distutils\ccompiler.py", line 1213, in gen_preprocess_options pp_opts.append("-I%s" % dir) File "C:\Users\dlabi\AppData\Local\Temp\pip-install-cc_7o3fh\isosplit5_2040a75061a44cb49aa8c5c954881ce5\setup.py", line 15, in str__ import pybind11 ModuleNotFoundError: No module named 'pybind11' [end of output]

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

magland commented 11 months ago

Thanks. Could you do pip install pybind11 and then retry?

kshtjkumar commented 11 months ago
Requirement already satisfied: pybind11 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (2.11.1)
Building wheels for collected packages: isosplit5
  Building wheel for isosplit5 (setup.py): started
  Building wheel for isosplit5 (setup.py): finished with status 'error'
  Running setup.py clean for isosplit5
Failed to build isosplit5
Note: you may need to restart the kernel to use updated packages.

  error: subprocess-exited-with-error

  python setup.py bdist_wheel did not run successfully.
  exit code: 1

  [125 lines of output]
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-39
  creating build\lib.win-amd64-cpython-39\isosplit5
  copying isosplit5\__init__.py -> build\lib.win-amd64-cpython-39\isosplit5
  running build_ext
  building 'isosplit5_interface' extension
  creating build\temp.win-amd64-cpython-39
  creating build\temp.win-amd64-cpython-39\Release
  creating build\temp.win-amd64-cpython-39\Release\src
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\pybind11\include -IC:\Users\dlabi\anaconda3\envs\pyks2\lib\site-packages\pybind11\include -IC:\Users\dlabi\anaconda3\envs\pyks2\include -IC:\Users\dlabi\anaconda3\envs\pyks2\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpsrc/isocut5.cpp /Fobuild\temp.win-amd64-cpython-39\Release\src/isocut5.obj /EHsc /DVERSION_INFO=\\\"0.1.3\\\"
  isocut5.cpp
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\isocut5.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\isocut5.h(21): error C2146: syntax error: missing ';' before identifier 'bigint'
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\isocut5.h(27): error C2061: syntax error: identifier 'bigint'
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\jisotonic5.h(22): error C2378: 'bigint': redefinition; symbol cannot be overloaded with a typedef
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\isocut5.h(21): note: see declaration of 'bigint'
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\jisotonic5.h(24): error C2146: syntax error: missing ')' before identifier 'N'
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\jisotonic5.h(25): error C2146: syntax error: missing ')' before identifier 'N'
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\jisotonic5.h(26): error C2146: syntax error: missing ')' before identifier 'N'
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\jisotonic5.h(27): error C2146: syntax error: missing ')' before identifier 'N'
  src/isocut5.cpp(23): error C2146: syntax error: missing ')' before identifier 'N'
  src/isocut5.cpp(24): error C2146: syntax error: missing ')' before identifier 'N'
  src/isocut5.cpp(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  src/isocut5.cpp(25): error C2146: syntax error: missing ';' before identifier 'find_min_index'
  src/isocut5.cpp(26): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  src/isocut5.cpp(26): error C2086: 'int ns_isocut5::bigint': redefinition
  src/isocut5.cpp(25): note: see declaration of 'ns_isocut5::bigint'
  src/isocut5.cpp(26): error C2146: syntax error: missing ';' before identifier 'find_max_index'
  src/isocut5.cpp(27): error C2146: syntax error: missing ')' before identifier 'N'
  src/isocut5.cpp(28): error C2065: 'critical_range_min': undeclared identifier
  src/isocut5.cpp(28): error C2065: 'critical_range_max': undeclared identifier
  src/isocut5.cpp(28): error C2146: syntax error: missing ')' before identifier 'N'
  src/isocut5.cpp(29): error C2146: syntax error: missing ')' before identifier 'N'
  src/isocut5.cpp(38): error C2146: syntax error: missing ';' before identifier 'i'
  src/isocut5.cpp(38): error C2143: syntax error: missing ';' before '='
  src/isocut5.cpp(38): error C2143: syntax error: missing ')' before '='
  src/isocut5.cpp(38): error C2059: syntax error: '='
  src/isocut5.cpp(38): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(38): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(38): error C2059: syntax error: ')'
  src/isocut5.cpp(39): error C2146: syntax error: missing ';' before identifier 'samplesf'
  src/isocut5.cpp(39): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(39): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(40): error C2660: 'isocut5': function does not take 5 arguments
  C:\Users\dlabi\AppData\Local\Temp\pip-install-7nvfneat\isosplit5_2f681f53584d4c9a8cae4048ea3f3996\src\isocut5.h(27): note: see declaration of 'isocut5'
  src/isocut5.cpp(44): error C2061: syntax error: identifier 'bigint'
  src/isocut5.cpp(46): error C2065: 'N': undeclared identifier
  src/isocut5.cpp(49): error C2065: 'opts': undeclared identifier
  src/isocut5.cpp(50): error C2039: 'copy_samples': is not a member of 'ns_isocut5'
  src/isocut5.cpp(22): note: see declaration of 'ns_isocut5'
  src/isocut5.cpp(50): error C2065: 'N': undeclared identifier
  src/isocut5.cpp(50): error C2065: 'samples': undeclared identifier
  src/isocut5.cpp(50): error C3861: 'copy_samples': identifier not found
  src/isocut5.cpp(52): error C2065: 'N': undeclared identifier
  src/isocut5.cpp(52): error C2065: 'samples': undeclared identifier
  src/isocut5.cpp(52): error C3861: 'jisotonic5_sort': identifier not found
  src/isocut5.cpp(55): error C2146: syntax error: missing ';' before identifier 'num_bins'
  src/isocut5.cpp(55): error C2065: 'num_bins': undeclared identifier
  src/isocut5.cpp(55): error C2065: 'N': undeclared identifier
  src/isocut5.cpp(57): error C2146: syntax error: missing ';' before identifier 'num_bins_1'
  src/isocut5.cpp(57): error C2065: 'num_bins_1': undeclared identifier
  src/isocut5.cpp(57): error C2065: 'num_bins': undeclared identifier
  src/isocut5.cpp(58): error C2146: syntax error: missing ';' before identifier 'num_bins_2'
  src/isocut5.cpp(58): error C2065: 'num_bins_2': undeclared identifier
  src/isocut5.cpp(58): error C2065: 'num_bins': undeclared identifier
  src/isocut5.cpp(58): error C2065: 'num_bins_1': undeclared identifier
  src/isocut5.cpp(59): error C2146: syntax error: missing ';' before identifier 'num_intervals'
  src/isocut5.cpp(59): error C2065: 'num_intervals': undeclared identifier
  src/isocut5.cpp(59): error C2065: 'num_bins_1': undeclared identifier
  src/isocut5.cpp(59): error C2065: 'num_bins_2': undeclared identifier
  src/isocut5.cpp(60): error C2065: 'num_intervals': undeclared identifier
  src/isocut5.cpp(61): error C2146: syntax error: missing ';' before identifier 'i'
  src/isocut5.cpp(61): error C2143: syntax error: missing ';' before '='
  src/isocut5.cpp(61): error C2143: syntax error: missing ')' before '='
  src/isocut5.cpp(61): error C2059: syntax error: '='
  src/isocut5.cpp(61): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(61): error C2065: 'num_bins_1': undeclared identifier
  src/isocut5.cpp(61): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(61): error C2059: syntax error: ')'
  src/isocut5.cpp(62): error C2146: syntax error: missing ';' before identifier 'intervals'
  src/isocut5.cpp(62): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(62): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(63): error C2146: syntax error: missing ';' before identifier 'i'
  src/isocut5.cpp(63): error C2143: syntax error: missing ';' before '='
  src/isocut5.cpp(63): error C2143: syntax error: missing ')' before '='
  src/isocut5.cpp(63): error C2059: syntax error: '='
  src/isocut5.cpp(63): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(63): error C2065: 'num_bins_2': undeclared identifier
  src/isocut5.cpp(63): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(63): error C2059: syntax error: ')'
  src/isocut5.cpp(64): error C2146: syntax error: missing ';' before identifier 'intervals'
  src/isocut5.cpp(64): error C2065: 'num_intervals': undeclared identifier
  src/isocut5.cpp(64): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(64): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(65): error C2065: 'N': undeclared identifier
  src/isocut5.cpp(65): error C2039: 'sum': is not a member of 'ns_isocut5'
  src/isocut5.cpp(22): note: see declaration of 'ns_isocut5'
  src/isocut5.cpp(65): error C2065: 'num_intervals': undeclared identifier
  src/isocut5.cpp(65): error C3861: 'sum': identifier not found
  src/isocut5.cpp(66): error C2146: syntax error: missing ';' before identifier 'i'
  src/isocut5.cpp(66): error C2143: syntax error: missing ';' before '='
  src/isocut5.cpp(66): error C2143: syntax error: missing ')' before '='
  src/isocut5.cpp(66): error C2059: syntax error: '='
  src/isocut5.cpp(66): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(66): error C2065: 'num_intervals': undeclared identifier
  src/isocut5.cpp(66): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(66): error C2059: syntax error: ')'
  src/isocut5.cpp(67): error C2146: syntax error: missing ';' before identifier 'intervals'
  src/isocut5.cpp(67): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(68): error C2146: syntax error: missing ';' before identifier 'N_sub'
  src/isocut5.cpp(68): error C2065: 'N_sub': undeclared identifier
  src/isocut5.cpp(68): error C2065: 'num_intervals': undeclared identifier
  src/isocut5.cpp(69): error C2065: 'N_sub': undeclared identifier
  src/isocut5.cpp(71): error C2146: syntax error: missing ';' before identifier 'i'
  src/isocut5.cpp(71): error C2143: syntax error: missing ';' before '='
  src/isocut5.cpp(71): error C2143: syntax error: missing ')' before '='
  src/isocut5.cpp(71): error C2059: syntax error: '='
  src/isocut5.cpp(71): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(71): error C2065: 'num_intervals': undeclared identifier
  src/isocut5.cpp(71): error C2065: 'i': undeclared identifier
  src/isocut5.cpp(71): fatal error C1003: error count exceeds 100; stopping compilation
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\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
ERROR: Could not build wheels for isosplit5, which is required to install pyproject.toml-based projects
magland commented 11 months ago

This appears to be a C++ compiler issue. For windows, I would suggest using WSL.

kshtjkumar commented 11 months ago

@magland hi i am not sure what to do here, can you please explain, sorry pretty naive to this.

JoeZiminski commented 11 months ago

Hey @kshtjkumar can you try the below in your terminal:

set CFLAGS="-std=c++11"
pip install isosplit5
kshtjkumar commented 11 months ago
(pyks2) C:\Users\dlabi>set CFLAGS="-std=c++11"

(pyks2) C:\Users\dlabi>pip install isosplit5
Requirement already satisfied: isosplit5 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (0.2.2)
Requirement already satisfied: numpy in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from isosplit5) (1.24.4)
Requirement already satisfied: pybind11>=2.2 in c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages (from isosplit5) (2.11.1)

same error comes when i run pip install mountainsort4

JoeZiminski commented 11 months ago

Interesting, that indicates that isosplit has been sucessfully installed. Can you try and run mountainsort4 and see if it works?

JoeZiminski commented 11 months ago

*I mean, that it is already installed, rather than that command just installed it.

kshtjkumar commented 11 months ago

nope! when i run to mountainsort4 it says its not installed:

Exception: The sorter mountainsort4 is not installed.Please install it with:  

To use Mountainsort4 run:

       >>> pip install mountainsort4

    More information on mountainsort at:
      * https://github.com/flatironinstitute/mountainsort

also pip install gives the same error as above!

JoeZiminski commented 11 months ago

haha, okay that is very strange 😅

Could you try:

1) close and reopen your terminal 2)

pip uninstall isosplit5
pip uninstall mountainsort4

3) go to c:\users\dlabi\anaconda3\envs\pyks2\lib\site-packages and delete any folder that has isosplit5 or mountainsort4 in the name. 4) then try:

pip show isosplit5
pip show mountainsort4

These should say they are not installed 5) Finally try

set CFLAGS="-std=c++11"
pip install isosplit5 --no-cache-dir

[NOTE: i just made an edit to the last line adding --no-cache-dir]

kshtjkumar commented 11 months ago

followed exactly as suggested! Deleted all files namedmoutainsort4 and isosplit5, reinstalled isosplit5 with no cache and then tried pip install moutainsort4.

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\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
JoeZiminski commented 11 months ago

That's a shame I thought that would work! Can I confirm the error message above what you sent i.e. above this line:

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

is the same as you had sent before?

It's strange, essentially all of those errors are because the C++ compiler not using the right standard but setting the environment flag should fix that. I am using Visual Studio 2022 and can install the package without issue. It might be worth uninstalling Visual Studio 2019 and upgrading Visual Studio to a newer version, the compiler that comes with VS 2022 might have a better time with isosplit5.

JoeZiminski commented 11 months ago

Or as Jeremy suggested using WSL (windows subsystem for Linux) is another route. This actually seems simpler than it used to be in newer windows versions: https://learn.microsoft.com/en-us/windows/wsl/install

betty-hbr commented 4 months ago

Hi @JoeZiminski , I encountered exactly the same issue as @kshtjkumar posted, and I also followed all above instructions ended with the same problem. I'm using VS2022.

` error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (isosplit5)`

JoeZiminski commented 4 months ago

Hi @betty-hbr, are you able to use Mountainsort5? The problem is the isosplit5 dependency, but installation wheels for most operating systems were added for isosplit6 (which Mountainsort5 depends on). Otherwise am happy to help troubleshoot, but unfortunately these compile errors are often a little tricky to solve.