当前位置:网站首页>pytorch打包exe出现WARNING: file already exists but should not: C:\Users\workAI\AppData\Local\Temp\_MEI13
pytorch打包exe出现WARNING: file already exists but should not: C:\Users\workAI\AppData\Local\Temp\_MEI13
2022-07-28 04:26:00 【sunshinecxm_BJTU】
参考: https://blog.csdn.net/weixin_43218120/article/details/108596405
此bug是使用pyinstaller编译文件为exe文件中产生的,具体如下:
WARNING: file already exists but should not: C:\Users\workAI\AppData\Local\Temp\_MEI132522\torch\_C
述bug在编译和运行过程中没有产生影响,但是自己在偶然的原因不知不觉的就解决了此bug,具体操作如下:
首先找到.spec配置文件修改配置文件,在配置文件中加入以下代码:
for d in a.datas:
if '_C.cp37-win_amd64.pyd' in d[0]:
a.datas.remove(d)
break
详细的.spec配置文件的内容如下:
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['MyTcpServer.py'],
pathex=['G:\\yolo'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
for d in a.datas:
if '_C.cp37-win_amd64.pyd' in d[0]:
a.datas.remove(d)
break
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='MyTcpServer',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
在修改完配置文件之后,使用如下命令进行编译exe文件:
pyinstaller MyTcpServer.spec
边栏推荐
- Zhejiang University and other recent review papers on deep learning new drug design
- 网页源代码查看竟然有这么多方法!你都知道吗?
- Reading of papers on "towards generative aspect based sentimental analysis"
- Kingbasees Security Guide for Jincang database -- 5.1. database transmission security
- 仿真测试断开服务器公网连接
- Kingbasees security guide of Jincang database -- 6.2. Configuration files related to authentication
- Applet form-2
- [coding and decoding] Huffman coding and decoding based on Matlab GUI [including Matlab source code 1976]
- 《关于我写自定义cell这件事》
- Efficient practice intelligent analysis of massive log data in aviation industry
猜你喜欢

将数据库拿到的数据渲染到elementUI 中的table中去

Reading of seq2path: generating sentimental tuples as paths of a tree

Null security and exception
![[blood vessel detection] Based on MATLAB mom method, combined with Hessian and curve fitting, blood vessel diameter measurement [including Matlab source code, 1970]](/img/72/10bd8a292c3ee3445907795ebf2ae8.png)
[blood vessel detection] Based on MATLAB mom method, combined with Hessian and curve fitting, blood vessel diameter measurement [including Matlab source code, 1970]

Information system project manager (2022) - key content: Project Portfolio Management (19)

网页源代码查看竟然有这么多方法!你都知道吗?

Esp8266 WiFi module and mobile communication

Glusterfs file is not mounted, permission: R-S

Advanced architects, 16 common principles of microservice design and Governance

Citrix virtual desktop tcp/udp transmission protocol switching
随机推荐
Information system project manager (2022) - key content: Strategic Management (17)
The State Administration of market supervision exposes typical cases of food safety
【实战】使用 Web Animations API 实现一个精确计时的时钟
Harmony's Application on the shelves reported an error. The solution of "please use the API of the released version to develop the application and apply for listing"
Cyber Nuwa, how to make digital people?
Solana「迷惑行为」:造手机、开门店
Shanghai Telecom released public computing services and signed the action plan of "Joint Innovation Center for intelligent computing applications" with Huawei and other partners
.net upload files through boundary
虚拟机类加载机制
【sylar】框架篇-Chapter15-Stream 模块
Cloud native Devops status survey questionnaire solicitation: kodelurover launched jointly with oschina
Ffmpeg common instructions
H. 265 web player easyplayer realizes webrtc video real-time recording function
VAE generation model (with VAE implementation MNIST code)
Kingbasees Security Guide for Jincang database -- 5.1. database transmission security
Sort - cardinal sort
Reading of papers on "towards generative aspect based sentimental analysis"
[coding and decoding] Huffman coding and decoding based on Matlab GUI [including Matlab source code 1976]
Detailed explanation of pl/sql parameters ("box model")
pytorch_ Lightning in lightning_ The output of hparams.yaml in logs is null