py-faster-rcnn-windows
py-faster-rcnn-windows copied to clipboard
setup_cuda.py error
Hi,thank you your code. I test on windows ,python Anaconda2,but has error.
running install
running bdist_egg
running egg_info
writing py_fast_rcnn_gpu.egg-info\PKG-INFO
writing top-level names to py_fast_rcnn_gpu.egg-info\top_level.txt
writing dependency_links to py_fast_rcnn_gpu.egg-info\dependency_links.txt
reading manifest file 'py_fast_rcnn_gpu.egg-info\SOURCES.txt'
writing manifest file 'py_fast_rcnn_gpu.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
building 'nms.gpu_nms' extension
Traceback (most recent call last):
File "setup_cuda.py", line 122, in
Anaconda2 use mingw32 ('gcc.bat'). Maybe u can change it to msvc.
Have u solved the problem? I meet the same as u!
It means you should add the location of "cl.exe" into PATH, for example, In my case, my "cl.exe" is in the "D:\VisualStudio2015\VC\bin" folder, I solve this problem by adding this repository into Windows PATH var
@BowieHsu Thanks,I have solved it. I mistake to put the location of 'cl.exe' in other environment variables. It should be put in PATH.
I still have the following error even after adding C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin location to PATH variable
C:\py-faster-rcnn\lib>python setup_cuda.py install
running install
running bdist_egg
running egg_info
writing py_fast_rcnn_gpu.egg-info\PKG-INFO
writing top-level names to py_fast_rcnn_gpu.egg-info\top_level.txt
writing dependency_links to py_fast_rcnn_gpu.egg-info\dependency_links.txt
reading manifest file 'py_fast_rcnn_gpu.egg-info\SOURCES.txt'
writing manifest file 'py_fast_rcnn_gpu.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
building 'nms.gpu_nms' extension
Traceback (most recent call last):
File "setup_cuda.py", line 122, in <module>
cmdclass={'build_ext': CUDA_build_ext},
File "C:\Anaconda2\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Anaconda2\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Anaconda2\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "C:\Anaconda2\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\Anaconda2\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Anaconda2\lib\site-packages\setuptools\command\bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\Anaconda2\lib\site-packages\setuptools\command\bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "C:\Anaconda2\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Anaconda2\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\Anaconda2\lib\distutils\command\install_lib.py", line 111, in build
self.run_command('build_ext')
File "C:\Anaconda2\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Anaconda2\lib\site-packages\setuptools\command\build_ext.py", line 75, in run
_build_ext.run(self)
File "C:\Anaconda2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "C:\Anaconda2\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "setup_cuda.py", line 48, in build_extensions
build_ext.build_extensions(self)
File "C:\Anaconda2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "C:\Anaconda2\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Anaconda2\lib\distutils\command\build_ext.py", line 499, in build_extension
depends=ext.depends)
File "C:\Anaconda2\lib\distutils\msvc9compiler.py", line 546, in compile
extra_postargs)
File "setup_cuda.py", line 77, in spawn
os.path.dirname(find_executable("cl.exe", PATH))
File "C:\Anaconda2\lib\ntpath.py", line 215, in dirname
return split(p)[0]
File "C:\Anaconda2\lib\ntpath.py", line 180, in split
d, p = splitdrive(p)
File "C:\Anaconda2\lib\ntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
have you reboot the PC since you update your PATH? @Jumabek
Using the method of OneDirection9, I have solved it. It should be put in PATH. And close the cmd command line, then restart to do this.