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

AttributeError: 'MSVCCompiler' object has no attribute 'compiler_so' #905

Open
yaoliu0803 opened this issue Feb 3, 2023 · 2 comments
Open

Comments

@yaoliu0803
Copy link

Environment:Windows+python3.6+pytorch1==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 cudatoolkit=11.7

When I run command:python setup.py build develop
the result are as follows:
(liuyao_faster_rcnn) D:\liuyao\code\faster-rcnn.pytorch\lib>python setup.py install
running install
running build
running build_ext
Traceback (most recent call last):
File "setup.py", line 136, in
cmdclass={'build_ext': custom_build_ext},
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "setup.py", line 112, in build_extensions
customize_compiler_for_nvcc(self.compiler)
File "setup.py", line 84, in customize_compiler_for_nvcc
default_compiler_so = self.compiler_so
AttributeError: 'MSVCCompiler' object has no attribute 'compiler_so'

Please help me anybody

@jiale2805825900
Copy link

in in Linux, isn't in Windows.

@Sophia35
Copy link

Environment:Windows+python3.6+pytorch1==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 cudatoolkit=11.7

When I run command:python setup.py build develop the result are as follows: (liuyao_faster_rcnn) D:\liuyao\code\faster-rcnn.pytorch\lib>python setup.py install running install running build running build_ext Traceback (most recent call last): File "setup.py", line 136, in cmdclass={'build_ext': custom_build_ext}, File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "C:\Users\HelloWorld.conda\envs\liuyao_faster_rcnn\lib\distutils\command\build_ext.py", line 339, in run self.build_extensions() File "setup.py", line 112, in build_extensions customize_compiler_for_nvcc(self.compiler) File "setup.py", line 84, in customize_compiler_for_nvcc default_compiler_so = self.compiler_so AttributeError: 'MSVCCompiler' object has no attribute 'compiler_so'

Please help me anybody

Hello, I have also encountered this problem, which has troubled me for a long time, may I ask if you have solved this problem now? Does it have to be on LInux?

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