当命令提示符给出导入错误时,当我尝试运行服务器python文件时,需要进行什么更改?

2024-09-20 17:47:23 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用2台android设备和Windows8 PC对非接触式卡进行中继攻击。由于我需要一台服务器将两台android设备连接在一起,我正在Windows 8 PC上设置一台服务器。 服务器是用Python编程的,我是从Python获得的 Github(https://github.com/nfcgate/server/blob/master/server.py)。我已成功安装protobuf 2.6。并遵循指南,试图在命令提示符下运行此命令,但遇到以下错误

          C:\Python27\server-master>server.py                                             
          Traceback (most recent call last):                                                
          File "C:\Python27\server-master\server.py", line 6, in <module>                   
          from messages import c2c_pb2                                                  
          File "C:\Python27\server-master\messages\c2c_pb2.py", line 6, in 
          <module>from google.protobuf import descriptor as _descriptor                       
          ImportError: No module named google.protobuf                                                                                                                    
          C:\Python27\server-master>                                                      

我已经重新安装了protpbuff 2.6,但是它给了我同样的错误

只需运行server.py,我希望使用设备的IP地址和默认端口5566连接到服务器


Tags: infrompymaster服务器server错误line

热门问题