nikitinvv / tomocupy-stream

3 stars 2 forks source link

pip install issue #3

Open dkazanc opened 1 year ago

dkazanc commented 1 year ago

Hi, I'm having this pip install issue, any ideas? thanks

(httomo) algol@home:~/Documents/OtherCODE/tomocupy-stream(main)$ pip install .
Processing /home/algol/Documents/OtherCODE/tomocupy-stream
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: tomocupy-stream
  Building wheel for tomocupy-stream (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      cmake: error while loading shared libraries: librhash.so.0: cannot open shared object file: No such file or directory
      Traceback (most recent call last):
        File "/home/algol/miniconda3/envs/httomo/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 564, in setup
          cmkr = cmaker.CMaker(cmake_executable)
        File "/home/algol/miniconda3/envs/httomo/lib/python3.10/site-packages/skbuild/cmaker.py", line 95, in __init__
          self.cmake_version = get_cmake_version(self.cmake_executable)
        File "/home/algol/miniconda3/envs/httomo/lib/python3.10/site-packages/skbuild/cmaker.py", line 81, in get_cmake_version
          raise SKBuildError(

      Problem with the CMake installation, aborting build. CMake executable is cmake
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tomocupy-stream
  Running setup.py clean for tomocupy-stream
Failed to build tomocupy-stream
Installing collected packages: tomocupy-stream
  Running setup.py install for tomocupy-stream ... error
  error: subprocess-exited-with-error

  × Running setup.py install for tomocupy-stream did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      /home/algol/miniconda3/envs/httomo/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      cmake: error while loading shared libraries: librhash.so.0: cannot open shared object file: No such file or directory
      Traceback (most recent call last):
        File "/home/algol/miniconda3/envs/httomo/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 564, in setup
          cmkr = cmaker.CMaker(cmake_executable)
        File "/home/algol/miniconda3/envs/httomo/lib/python3.10/site-packages/skbuild/cmaker.py", line 95, in __init__
          self.cmake_version = get_cmake_version(self.cmake_executable)
        File "/home/algol/miniconda3/envs/httomo/lib/python3.10/site-packages/skbuild/cmaker.py", line 81, in get_cmake_version
          raise SKBuildError(

      Problem with the CMake installation, aborting build. CMake executable is cmake
      [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.
╰─> tomocupy-stream

note: This is an issue with the package mentioned above, not pip.
nikitinvv commented 1 year ago

@dkazanc could you install cmake from conda? conda install -c conda-forge cmake

I've updated README accordingly

dkazanc commented 1 year ago

I've got cmake in my environment already... there are some related(?) issues around that suggest that cmake should be pip installed (compiled) in a specific order?

Anyway in a new environment I've got this new error although scikit-build is already in the environment

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "/home/algol/miniconda3/envs/tomocupy/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/algol/miniconda3/envs/tomocupy/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/algol/miniconda3/envs/tomocupy/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-i1s9p7q0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-i1s9p7q0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-i1s9p7q0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 1, in <module>
      ModuleNotFoundError: No module named 'skbuild'
      [end of output]
nikitinvv commented 1 year ago

looks strange, could you double check the environment? and then just try python -c 'import skbuild'. I typically install everyhting from conda-forge. could you try conda install -c conda-forge scikit-build? I see python=3.11, maybe something is still missing it? could you try python=3.10