princeton-vl/lietorch

cannot install the package

ykzzyk opened this issue · 4 comments

OS: Windows 11
Python version: Python 3.8.13

when I install it from the source (python setup.py install), I got the issue looked like:

No CUDA runtime is found, using CUDA_HOME='User\local\Cuda'
running install
C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing lietorch.egg-info\PKG-INFO
writing dependency_links to lietorch.egg-info\dependency_links.txt
writing top-level names to lietorch.egg-info\top_level.txt
reading manifest file 'lietorch.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'lietorch.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    setup(
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install.py", line 74, in run
    self.do_egg_install()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install.py", line 116, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
    _build_ext.run(self)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\torch\utils\cpp_extension.py", line 434, in build_extensions
    self._check_cuda_version(compiler_name, compiler_version)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\torch\utils\cpp_extension.py", line 808, in _check_cuda_version
    torch_cuda_version = packaging.version.parse(torch.version.cuda)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 49, in parse
    return Version(version)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 264, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

When i install from the pip (pip install lietorch), It can be installed, but I got the following error:

>>> import lietorch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\Windows\GitHub\lietorch\lietorch\__init__.py", line 2, in <module>
    from .groups import LieGroupParameter, SO3, RxSO3, SE3, Sim3, cat, stack
  File "E:\Windows\GitHub\lietorch\lietorch\groups.py", line 5, in <module>
    from .group_ops import Exp, Log, Inv, Mul, Adj, AdjT, Jinv, Act3, Act4, ToMatrix, ToVec, FromVec
  File "E:\Windows\GitHub\lietorch\lietorch\group_ops.py", line 1, in <module>
    import lietorch_backends
ModuleNotFoundError: No module named 'lietorch_backends'

Could someone who successfully installed the package before give me some suggestions?
Thanks!

Try linux

OS: Windows 11 Python version: Python 3.8.13

when I install it from the source (python setup.py install), I got the issue looked like:

No CUDA runtime is found, using CUDA_HOME='User\local\Cuda'
running install
C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing lietorch.egg-info\PKG-INFO
writing dependency_links to lietorch.egg-info\dependency_links.txt
writing top-level names to lietorch.egg-info\top_level.txt
reading manifest file 'lietorch.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'lietorch.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    setup(
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install.py", line 74, in run
    self.do_egg_install()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install.py", line 116, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
    _build_ext.run(self)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\torch\utils\cpp_extension.py", line 434, in build_extensions
    self._check_cuda_version(compiler_name, compiler_version)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\torch\utils\cpp_extension.py", line 808, in _check_cuda_version
    torch_cuda_version = packaging.version.parse(torch.version.cuda)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 49, in parse
    return Version(version)
  File "C:\Users\nicol\miniconda3\envs\cir\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 264, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

When i install from the pip (pip install lietorch), It can be installed, but I got the following error:

>>> import lietorch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\Windows\GitHub\lietorch\lietorch\__init__.py", line 2, in <module>
    from .groups import LieGroupParameter, SO3, RxSO3, SE3, Sim3, cat, stack
  File "E:\Windows\GitHub\lietorch\lietorch\groups.py", line 5, in <module>
    from .group_ops import Exp, Log, Inv, Mul, Adj, AdjT, Jinv, Act3, Act4, ToMatrix, ToVec, FromVec
  File "E:\Windows\GitHub\lietorch\lietorch\group_ops.py", line 1, in <module>
    import lietorch_backends
ModuleNotFoundError: No module named 'lietorch_backends'

Could someone who successfully installed the package before give me some suggestions? Thanks!

I'm having the exact same issue on Windows 11.

Also, I think the lietorch library up on PyPI is different to this one: the functions/operators are different.

Try this out @ykzzyk , @tomwatts-vm:

conda install -c "nvidia/label/cuda-11.6.0" cuda-toolkit
conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia

(or any other supported cuda version, and possibly in a freshly installed conda environment), before installing lietorch.

I had the same problem and this way I was able to overcome it this way: as far as I could understand, the error we came across is generated by a mismatch in the cuda version installed with the first command, and the cuda version with which pytorch was compiled.

Also note that your version of pytorch must be compatible with the version of cuda on your machine.
To check this, print(torch.cuda.is_available()).
If the answer is false you will need to upgrade your cuda version (https://developer.nvidia.com/cuda-11-6-0-download-archive) or downgrade your pytorch version (https://pytorch.org/get-started/previous-versions/)