Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Error #4

Closed
chrisdcs opened this issue Jun 7, 2022 · 10 comments
Closed

Install Error #4

chrisdcs opened this issue Jun 7, 2022 · 10 comments

Comments

@chrisdcs
Copy link

chrisdcs commented Jun 7, 2022

Hi, I tried follow strictly the environment you provided, but it keeps giving me errors like this both in Windows and Linux, can you help me with the installation. I tried StackOverflow, but there is no solution I can find. Thank you very much.

Traceback (most recent call last):

  File ~\anaconda3\envs\CT\lib\site-packages\torch\utils\cpp_extension.py:1667 in _run_ninja_build
    subprocess.run(

  File ~\anaconda3\envs\CT\lib\subprocess.py:516 in run
    raise CalledProcessError(retcode, process.args,

CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.


The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File E:\research\sparse_view_ct-main\projection_simulatuion\CTLIB\setup.py:4 in <module>
    setup(

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\__init__.py:87 in setup
    return distutils.core.setup(**attrs)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\core.py:148 in setup
    return run_commands(dist)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\core.py:163 in run_commands
    dist.run_commands()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\dist.py:967 in run_commands
    self.run_command(cmd)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\dist.py:1214 in run_command
    super().run_command(command)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\dist.py:986 in run_command
    cmd_obj.run()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\command\install.py:74 in run
    self.do_egg_install()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\command\install.py:123 in do_egg_install
    self.run_command('bdist_egg')

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\cmd.py:313 in run_command
    self.distribution.run_command(command)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\dist.py:1214 in run_command
    super().run_command(command)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\dist.py:986 in run_command
    cmd_obj.run()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\command\bdist_egg.py:165 in run
    cmd = self.call_command('install_lib', warn_dir=0)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\command\bdist_egg.py:151 in call_command
    self.run_command(cmdname)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\cmd.py:313 in run_command
    self.distribution.run_command(command)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\dist.py:1214 in run_command
    super().run_command(command)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\dist.py:986 in run_command
    cmd_obj.run()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\command\install_lib.py:11 in run
    self.build()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\command\install_lib.py:107 in build
    self.run_command('build_ext')

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\cmd.py:313 in run_command
    self.distribution.run_command(command)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\dist.py:1214 in run_command
    super().run_command(command)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\dist.py:986 in run_command
    cmd_obj.run()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\command\build_ext.py:79 in run
    _build_ext.run(self)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\command\build_ext.py:339 in run
    self.build_extensions()

  File ~\anaconda3\envs\CT\lib\site-packages\torch\utils\cpp_extension.py:708 in build_extensions
    build_ext.build_extensions(self)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\command\build_ext.py:448 in build_extensions
    self._build_extensions_serial()

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\command\build_ext.py:473 in _build_extensions_serial
    self.build_extension(ext)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\command\build_ext.py:202 in build_extension
    _build_ext.build_extension(self, ext)

  File ~\anaconda3\envs\CT\lib\site-packages\setuptools\_distutils\command\build_ext.py:528 in build_extension
    objects = self.compiler.compile(sources,

  File ~\anaconda3\envs\CT\lib\site-packages\torch\utils\cpp_extension.py:681 in win_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(

  File ~\anaconda3\envs\CT\lib\site-packages\torch\utils\cpp_extension.py:1354 in _write_ninja_file_and_compile_objects
    _run_ninja_build(

  File ~\anaconda3\envs\CT\lib\site-packages\torch\utils\cpp_extension.py:1683 in _run_ninja_build
    raise RuntimeError(message) from e

RuntimeError: Error compiling objects for extension
@xiawj-hub
Copy link
Owner

xiawj-hub commented Jun 10, 2022 via email

@chrisdcs
Copy link
Author

Thank you very much for the help. My windows environment is cuda 10.2, torch 1.8.0 (> 1.7.0). Now I managed to install it in Ubuntu 20.04, cuda 11.3, torch 1.10.0

But still can't install it on Windows, I can try to read the blog you sent me, but can you give me some general instructions on how to trouble shoot these issues so that I can try to solve it by myself?

Thank you very much!

@xiawj-hub
Copy link
Owner

xiawj-hub commented Oct 11, 2022 via email

@zlbbme
Copy link

zlbbme commented Dec 28, 2022

Thank you very much for the help. My windows environment is cuda 10.2, torch 1.8.0 (> 1.7.0). Now I managed to install it in Ubuntu 20.04, cuda 11.3, torch 1.10.0

But still can't install it on Windows, I can try to read the blog you sent me, but can you give me some general instructions on how to trouble shoot these issues so that I can try to solve it by myself?

Thank you very much!

Thank you very much for the help. My windows environment is cuda 10.2, torch 1.8.0 (> 1.7.0). Now I managed to install it in Ubuntu 20.04, cuda 11.3, torch 1.10.0

But still can't install it on Windows, I can try to read the blog you sent me, but can you give me some general instructions on how to trouble shoot these issues so that I can try to solve it by myself?

Thank you very much!

Do you solve the question? I got the same question,My environment is cuda 11.1,torch1.8

@chrisdcs
Copy link
Author

Yes, I solved it, I think upgrading Pytorch to 1.10 worked. But I am not sure if it's that simple. It also has something to do with ninja compatibility with Pytorch. It's been a while so I don't remember all the details, wish I could help more, good luck!

@zlbbme
Copy link

zlbbme commented Dec 30, 2022

Thanks for your reply,I update my pytorch vesion to 1.10.1,and i code "python setup.py install" ,then I got this error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1;so I'm very confused.
looking forward to your reply

@xiawj-hub
Copy link
Owner

xiawj-hub commented Jan 1, 2023 via email

@chrisdcs
Copy link
Author

chrisdcs commented Jan 4, 2023

That's odd, I just did two tests recently, and I can install it with PyTorch 1.10 + Cuda 11.3 and Pytorch 1.13 + Cuda 11.6 with new clean conda environments.
Maybe it has something to do with your Cuda and GCC versions?
All these are linux, I could never install it in my windows system.

@zlbbme
Copy link

zlbbme commented Jan 11, 2023

Thanks for your reply,I apply the method of Dr.xwj and I completed the ctlib install finally.
I also install the ctlib with pytorch 1.13+cuda 11.6,but I am confused with this situation:
I code python setup.py install ,then the terminal shows :
"Installed /home/zlb/anaconda3/lib/python3.9/site-packages/ctlib-0.2.0-py3.9-linux-x86_64.egg
Processing dependencies for ctlib==0.2.0
Finished processing dependencies for ctlib==0.2.0"
I think that I haved installed ctlib ;
but I code "import ctlib" ,then the interpreter reply me with this error:
"libc10.so: cannot open shared object file: No such file or directory"

So, I don't know how to solve this question,thanks.

@zlbbme
Copy link

zlbbme commented Jan 11, 2023

sorry, I am very fool.
import ctlib before, we must import torch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants