valeoai / LightConvPoint

Other
64 stars 15 forks source link

No 'libtorch_cpu.so' for knn #10

Open Mencu opened 3 years ago

Mencu commented 3 years ago

Hi, I tried installing LightConvPoint without the C++ libs for knn search, as instructed in the #Installation. Although, I got an error:

UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-opt
ion.
  cmdoptions.check_install_build_global(options)
Using pip 20.3.1 from /u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip (python 3.7)
Non-user install because site-packages writeable
Created temporary directory: /tmp/pip-ephem-wheel-cache-vaa8slyv
Created temporary directory: /tmp/pip-req-tracker-t8qqiwxb
Initialized build tracking at /tmp/pip-req-tracker-t8qqiwxb
Created build tracker: /tmp/pip-req-tracker-t8qqiwxb
Entered build tracker: /tmp/pip-req-tracker-t8qqiwxb
Created temporary directory: /tmp/pip-install-u4xsb_cb
Obtaining file:///wholebrain/u/amancu/Projects/LightConvPoint
  Added file:///wholebrain/u/amancu/Projects/LightConvPoint to build tracker '/tmp/pip-req-tracker-t8qqiwxb'
    Running setup.py (path:/wholebrain/u/amancu/Projects/LightConvPoint/setup.py) egg_info for package from file:///wholebrain/u/amancu/Projects/LightConvPoint
    Created temporary directory: /tmp/pip-pip-egg-info-h33zv15c
    Running command python setup.py egg_info
    ['/wholebrain/u/amancu/Projects/LightConvPoint/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-h33zv15c']
    LIGHTCONVPOINT -- PYTHON MODULES
    running egg_info
    creating /tmp/pip-pip-egg-info-h33zv15c/lightconvpoint.egg-info
    writing /tmp/pip-pip-egg-info-h33zv15c/lightconvpoint.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-h33zv15c/lightconvpoint.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-h33zv15c/lightconvpoint.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-h33zv15c/lightconvpoint.egg-info/SOURCES.txt'
    reading manifest file '/tmp/pip-pip-egg-info-h33zv15c/lightconvpoint.egg-info/SOURCES.txt'
    writing manifest file '/tmp/pip-pip-egg-info-h33zv15c/lightconvpoint.egg-info/SOURCES.txt'
  Source in /wholebrain/u/amancu/Projects/LightConvPoint has version 0.0.0, which satisfies requirement lightconvpoint==0.0.0 from file:///wholebrain/u/amancu/Projects/LightConvPoint
  Removed lightconvpoint==0.0.0 from file:///wholebrain/u/amancu/Projects/LightConvPoint from build tracker '/tmp/pip-req-tracker-t8qqiwxb'
Created temporary directory: /tmp/pip-unpack-dpl2fx6v
Installing collected packages: lightconvpoint
  Running setup.py develop for lightconvpoint
    Running command /u/amancu/anaconda3/envs/lcp/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'.../u/amancu/Projects/LightConvPoint/setup.py'"'"'; __file__='"'"'.../u/amancu/Projects/LightConvPoint/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'
"'"'))' develop --no-deps --nocompile
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help

    error: option --nocompile not recognized
    ['.../u/amancu/Projects/LightConvPoint/setup.py', 'develop', '--no-deps', '--nocompile']
    LIGHTCONVPOINT -- PYTHON MODULES
ERROR: Command errored out with exit status 1: /u/amancu/anaconda3/envs/lcp/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'.../u/amancu/Projects/LightConvPoint/setup.py'"'"'; __file__='"'"'.../u/amancu/Projects/LightConvPoint/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --nocompile Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 224, in _main
    status = self.run(options, args)
  File "/u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
File "/u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 403, in run
    pycompile=options.compile,
  File "/u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 90, in install_given_reqs
    pycompile=pycompile,
  File "/u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 802, in install
    unpacked_source_directory=self.unpacked_source_directory,
  File "/u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip/_internal/operations/install/editable_legacy.py", line 51, in install_editable
    cwd=unpacked_source_directory,
  File "/u/amancu/anaconda3/envs/lcp/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 240, in call_subprocess
    raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /u/amancu/anaconda3/envs/lcp/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/.../LightConvPoint/setup.py'"'"'; __file__='"'"'.../LightConvPoint/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --nocompile Check the logs for full command output.
Removed build tracker: '/tmp/pip-req-tracker-t8qqiwxb'

Then, I tried with the C++ libs. It worked fine, until I wanted to run a script that uses lightconvpoint:

Traceback (most recent call last):
  File "train_merge_error.py", line 19, in <module>
    from elektronn3.models.lcp_adapt import ConvAdaptSeg
  File ".../models/lcp_adapt.py", line 15, in <module>
    import lightconvpoint.nn as lcp_nn
  File ".../LightConvPoint/lightconvpoint/nn/__init__.py", line 10, in <module>
    from .search_convpoint import SearchConvPoint
  File ".../LightConvPoint/lightconvpoint/nn/search_convpoint.py", line 2, in <module>
    import lightconvpoint.knn as nearest_neighbors
  File ".../LightConvPoint/lightconvpoint/knn/__init__.py", line 1, in <module>
    from .knn import knn
  File ".../LightConvPoint/lightconvpoint/knn/knn.py", line 8, in <module>
    knn_c_func = importlib.util.module_from_spec(knn_c_func_spec)
ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory

Any ideas of how I can fix this?

My torch specs are: pytorch 1.4.0 py3.7_cuda10.1.243_cudnn7.6.3_0 torch-cluster 1.5.4 pypi_0 torch-geometric 1.7.0 pypi_0 torch-scatter 2.0.4 pypi_0 torch-sparse 0.6.1 pypi_0 torch-spline-conv 1.2.0 pypi_0 torchvision 0.5.0 py37_cu101

Thank you!