使用pyinstaller 发布py文件为exe。遇到的问题总结(tensorflow,gpu)

1,ModuleNotFoundError:No module named 'tensorflow.python._pywrap_tensorflow_internal.pyd'

参考:https://stackoverflow.com/questions/49620638/tensorflow-gpu-with-pyinstaller

修改dist下文件名:_pywrap_tensorflow_internal.pyd为tensorflow.python._pywrap_tensorflow_internal.pyd

(执行pyinstaller命令去掉 -F)若是生成一个文件

请参考:https://stackoverflow.com/questions/49732801/windows-10-pyinstaller-tensorflow-missing-modules/50580345

 

2,AttributeError: type object 'pandas._libs.tslibs.conversion._TSObject' has no attribute '__reduce_cython__'

参考:https://blog.csdn.net/Roanlys/article/details/80951185

参考:https://blog.csdn.net/qq_41185868/article/details/80601983

我的python 3.6.6  执行pip install pandas==0.20.0

上面是我遇到的问题。

 

3 utf-8错误

chcp 65001

 

完整命令:

在cpu版本下运行

代码加入

import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"  
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"

我的cuda 64 9.0

pyinstaller -F -c XXX_cpu.py --add-data tensorflow.python._pywrap_tensorflow_internal.pyd;. --add-data cudart64_90.dll;.

 

Windows安装pycocotools出现错误“cl: 命令行 error D8021 :无效的数值参数“/Wno-cpp””的解决办法:

https://github.com/philferriere/cocoapi

 


--------------------- 
作者:dreamflywhere 
来源:CSDN 
原文:https://blog.csdn.net/dreamFlyWhere/article/details/82463902?utm_source=copy 
版权声明:本文为博主原创文章,转载请附上博文链接!

你可能感兴趣的:(智能:机器学学,>,深度学习)