question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError: Error compiling objects for extension during installation of kaolin

See original GitHub issue

Hi, I followed the steps provided in README. I create a virtual environment and installed latest version PyTorch. When I execute python setup.py build_ext --inplace or python setup.py install, I encountered the following errors. I have tried both python 3.6 and python 3.7. The results are the same. My cuda version is 10.2, PyTorch is 1.5, NumPy is 1.18, ninja version is 1.10. The OS is Ubuntu 18.04. Thanks for your help!

[2/2] /usr/local/cuda/bin/nvcc -I/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/include -I/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/include/TH -I/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/numpy/core/include -I/home/yyyeh/anaconda3/envs/kaolin/include/python3.7m -c -c /home/yyyeh/library/kaolin/kaolin/cuda/load_textures_cuda_kernel.cu -o /home/yyyeh/library/kaolin/build/temp.linux-x86_64-3.7/kaolin/cuda/load_textures_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘-fPIC’ -Wno-deprecated-declarations -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14 ninja: build stopped: subcommand failed. Traceback (most recent call last): File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1400, in _run_ninja_build check=True) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/subprocess.py”, line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “setup.py”, line 230, in <module> cmdclass={‘build_ext’: KaolinBuildExtension} File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/setuptools/init.py”, line 144, in setup return distutils.core.setup(**attrs) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/distutils/core.py”, line 148, in setup dist.run_commands() File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/distutils/dist.py”, line 966, in run_commands self.run_command(cmd) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/distutils/dist.py”, line 985, in run_command cmd_obj.run() File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/setuptools/command/build_ext.py”, line 87, in run _build_ext.run(self) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/distutils/command/build_ext.py”, line 340, in run self.build_extensions() File “setup.py”, line 89, in build_extensions super().build_extensions() File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 580, in build_extensions build_ext.build_extensions(self) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/distutils/command/build_ext.py”, line 449, in build_extensions self._build_extensions_serial() File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/distutils/command/build_ext.py”, line 474, in _build_extensions_serial self.build_extension(ext) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/setuptools/command/build_ext.py”, line 208, in build_extension _build_ext.build_extension(self, ext) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/distutils/command/build_ext.py”, line 534, in build_extension depends=ext.depends) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 423, in unix_wrap_ninja_compile with_cuda=with_cuda) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1140, in _write_ninja_file_and_compile_objects error_prefix=‘Error compiling objects for extension’) File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1413, in _run_ninja_build raise RuntimeError(message) RuntimeError: Error compiling objects for extension

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
MBrandt-NASAcommented, Aug 25, 2020

It would be great to see Kaolin updated to more recent versions of both Python and Pytorch… it’s starting to fall behind in both areas.

I’m looking at using Kaolin on NASA projects, so I’d love to see it continue to be updated, please. 😃

1reaction
yuyingyehcommented, Apr 21, 2020

Since there is no official Conda installation for PyTorch 1.4, I rather install PyTorch 1.2. And now I can install kaolin successfully. However, when I tried to import kaolin, I met another error.

(kaolin) yyyeh@ubuntu:~/library$ python Python 3.6.10 | packaged by conda-forge | (default, Apr 6 2020, 14:52:36) [GCC 7.3.0] on linux Type “help”, “copyright”, “credits” or “license” for more information.

import kaolin as kal Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.1.0-py3.6-linux-x86_64.egg/kaolin/init.py”, line 17, in <module> File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.1.0-py3.6-linux-x86_64.egg/kaolin/conversions/init.py”, line 1, in <module> File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.1.0-py3.6-linux-x86_64.egg/kaolin/conversions/meshconversions.py”, line 20, in <module> File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.1.0-py3.6-linux-x86_64.egg/kaolin/metrics/init.py”, line 2, in <module> File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.1.0-py3.6-linux-x86_64.egg/kaolin/metrics/point.py”, line 16, in <module> File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.1.0-py3.6-linux-x86_64.egg/kaolin/nnsearch.py”, line 7, in <module> File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/site-packages/kaolin-0.1.0-py3.6-linux-x86_64.egg/kaolin/nnsearch.py”, line 6, in bootstrap File “/home/yyyeh/anaconda3/envs/kaolin/lib/python3.6/imp.py”, line 343, in load_dynamic return _load(spec) ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory

Thanks for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

RuntimeError: Error compiling objects for extension while ...
I just finished installing the tensorflow object detection API so I have pycocotools and other c++ build tools required. Are there more ...
Read more >
Error compiling objects for extension_幸福回头的博客
前面的几个步骤都没什么问题,就最后一步的python setup develop的时候,出现了. RuntimeError: Error compiling objects for extension 这个错误.
Read more >
RuntimeError: Error compiling objects for ... - PyTorch Forums
I'm trying to install detectron2 on my local machine. A cpp_extension.py located in.
Read more >
Setting up Stable Diffusion for MacOS - DEV Community ‍ ‍
I tried a pip install onnx and it went through every version unsucessfully.) Pip subprocess error: Running command git fetch -q --tags Running ......
Read more >
Untitled
Eco tax on electronics in ontario, Friburgo turismo germania, Dvpc form, Cairo bank uganda address ... Schmerzhafter druck im ohr, As2124 extension of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found