I was trying to compile a c++ extension followed the tutorial 6, but failed.
here is  the log information
running install
running bdist_egg
Traceback (most recent call last):
File “D:/users/v-dalin/workspace/projects/toy/extension-ffi-master/package/cpp_extension/setup.py”, line 6, in 
cmdclass={‘build_ext’: BuildExtension})
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\site-packages\setuptools_init_.py”, line 129, in setup
return distutils.core.setup(**attrs)
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\distutils\core.py”, line 148, in setup
dist.run_commands()
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\distutils\dist.py”, line 955, in run_commands
self.run_command(cmd)
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\distutils\dist.py”, line 974, in run_command
cmd_obj.run()
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\site-packages\setuptools\command\install.py”, line 67, in run
self.do_egg_install()
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\site-packages\setuptools\command\install.py”, line 109, in do_egg_install
self.run_command(‘bdist_egg’)
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\distutils\cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\distutils\dist.py”, line 973, in run_command
cmd_obj.ensure_finalized()
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\distutils\cmd.py”, line 107, in ensure_finalized
self.finalize_options()
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\site-packages\setuptools\command\bdist_egg.py”, line 118, in finalize_options
self.distribution.has_ext_modules() and self.plat_name
File “D:\users\v-dalin\software\anaconda3\envs\py36-torch04\lib\distutils\dist.py”, line 983, in has_ext_modules
return self.ext_modules and len(self.ext_modules) > 0
TypeError: object of type ‘Extension’ has no len()
Process finished with exit code 1

OS: Windows Server 2012 R2
PyTorch version: 0.41
Python version: Python 3.6.6,  Anaconda3
CUDA/cuDNN version: 8.0, 5.1