这是脚本..
from distutils.core import setup, Extension
nmap = Extension('nmap',sources = ['nmap/nmap.py',
'nmap/__init__.py', 'nmap/example.py'])
from nmap import *
setup (
name = 'python-nmap',
version = nmap.__version__,
author = 'Alexandre Norman',
author_email = 'norman@xael.org',
license ='gpl-3.0.txt',
keywords="nmap, portscanner, network, sysadmin",)
...我收到了这个错误:
Traceback (most recent call last):
File "C:\Python27\nmap.py", line 6, in <module>
from nmap import *
File "C:\Python27\nmap.py", line 17, in <module>
version = nmap.__version__,
AttributeError: Extension instance has no attribute '__version__'