1.
    
    
     windows平台的话,先把.py改成.pyw。
    
   
    
     
    
   
    
     
      2.如果是直接指定python文件进行pyinstaller打包的话,需要添加–noconsole
     
     
    
   
    
     
     
    
   
pyinstaller tools2.py --noconsole   
   
    
     
      
       
      
     
    
   
   3.如果想只打包成一个exe
   
pyinstaller -F tools2.py --noconsole   
    或
   
   
pyinstaller -F -w tools2.py   
    更换最终exe生成路径
   
   
   
    在cmd中,一开始就要 cd D:\temp\ 切换到输出文件夹,然后在用上面的代码
   
    
     
      
       
        
       
      
     
    
   
    
     
      
       
        
        
       
      
     
    
   
    
     
      
       
        
       
      
     
    
   
    
     
      
       
        
        
       
      
     
    
   
 
版权声明:本文为xfyangle原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
