FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

目录

FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

问题:

解决:

完整错误:


启示:
如果对应的错误日志在百度和bing都没有找到满意的结果,快速找google不要犹豫,犹豫就会浪费时间,时间宝贵不用我教你;
如果条件允许,自己搞个梯子,这样就可以使用google查找错误日志,事半功倍;
如果条件不允许,自己去找一些免费的梯子,速度慢一点也能用,毕竟是免费的不要太苛刻;

问题:

pyinstaller --clean --onefile LSTM_prediction.py

pyinstaller打包执行lstm程序(基于tensorflow 1.14版本编写)

解决:

#许多网上的资料推荐使用如下方法,不过没有解决笔者的问题;

1. pip uninstall numpy
2. pip install numpy==1.16.4

#

在jupyter中运行原始程序发现如下日志:

D:\anaconda\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
D:\anaconda\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

那么笔者找到对应目录进行修改:

将1改为:(1,)

#原始

_np_qint8 = np.dtype([("qint8", np.int8, 1)])
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
_np_qint32 = np.dtype([("qint32", np.int32, 1)])# _np_bfloat16 is defined by a module import.# Custom struct dtype for directly-fed ResourceHandles of supported type(s).
np_resource = np.dtype([("resource", np.ubyte, 1)])

#修改后:

_np_qint8 = np.dtype([("qint8", np.int8, (1,))])
_np_quint8 = np.dtype([("quint8", np.uint8, (1,))])
_np_qint16 = np.dtype([("qint16", np.int16, (1,))])
_np_quint16 = np.dtype([("quint16", np.uint16, (1,))])
_np_qint32 = np.dtype([("qint32", np.int32, (1,))])# _np_bfloat16 is defined by a module import.# Custom struct dtype for directly-fed ResourceHandles of supported type(s).
np_resource = np.dtype([("resource", np.ubyte, (1,))])

完整错误:

d; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
......
............................

d; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI287642\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
Traceback (most recent call last):
  File "LSTM-Test.py", line 35, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\tensorflow\python\autograph\__init__.py", line 37, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\tensorflow\python\autograph\core\converter.py", line 71, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\tensorflow\python\autograph\pyct\cfg.py", line 41, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\tensorflow\python\autograph\pyct\compiler.py", line 32, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\astor\__init__.py", line 24, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\x~1\\AppData\\Local\\Temp\\_MEI253042\\astor\\VERSION'
[26340] Failed to execute script LSTM

参考:No such file or directory error using pyinstaller and scrapy

参考:"synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'." problem in TensorFlow

FutureWarning: Passing (type, 1) or ‘1type‘ it will be understood as (type, (1,)) / ‘(1,)type‘相关推荐

  1. 运行tensorflow代码出现dtypes.py:516: FutureWarning: Passing (type, 1) or '1type的解决方法(亲测)

    使用tensorflow写的深度学习模型,在服务器上跑模型时老是弹出/anaconda3/envs/tf/lib/python3.5/site-packages/tensorflow/python/f ...

  2. 解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate

    最近因为要做一个基于深度学习的人脸识别项目,要用到TensorFlow,但是下载完成后后发现import tensorflow总是出现FutureWarning: Passing (type, 1) ...

  3. TensorFlow报错FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated......(亲测)

    使用TensorFlow时报错FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a ...

  4. 运行keras出现 FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated解决办法

    运行keras出现 FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a futur ...

  5. python调用TensorFlow时报错:FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated

    问题: 使用Tensorflow时报错: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; ...

  6. FutureWarning: Passing (type 1) or 1type as a synonym of type is deprecated in a future vers 的解决

    使用tensorflow时遇到以下警告信息,虽然不影响使用,但是看着不爽.具体解决办法如下. 警告信息: FutureWarning: Passing (type, 1) or '1type' as ...

  7. dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a

    dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a ...

  8. Python:设置不显示Using TensorFlow backend及FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of typ

    Python:设置不显示Using TensorFlow backend及FutureWarning: Passing type, 1 or '1type' as a synonym of type ...

  9. anaconda调用TensorFlow出现dtypes.py:526: FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of typ

    在anaconda  prompt调用TensorFlow,出现D:\anaconda\lib\site-packages\tensorflow\python\framework\dtypes.py: ...

最新文章

  1. 一行代码太长的解决方法
  2. 三点到六点是几个小时_环卫工在10吨垃圾里找了6小时,终于找到这张价值19万元的餐巾纸...
  3. Eclipse编程快捷键
  4. jspspy database help
  5. mybatis mysql 方言_mybatis-MyBatits执行效率问题
  6. python 谷歌翻译 api_python免费调用谷歌翻译接口
  7. 【T3】将“恢复记账前状态”按钮放置到工作台,一直显示。
  8. windows server backup功能
  9. 基础算法-生兔子(JAVA)
  10. 本文将要讨论Objective-C中的方法替换(method replacement)和swizzling(移魂大法)。
  11. Graham Scan算法
  12. 名字空间的含义及作用
  13. worksheet怎么读_worksheet是什么意思_worksheet的翻译_音标_读音_用法_例句_爱词霸在线词典...
  14. 2 Sets HDD200 Drilling Mud Recycling System for CPP
  15. 《GTA5》游戏拆解分析
  16. UML2.0包含的14种图
  17. NanoPi NEO小试牛刀(二)
  18. 读懂老板的暗语,你需要知道解释器模式~
  19. R语言/Python 将地址标记在地图上
  20. RIKIBOT-FX4多线激光雷达与LIO-SAM算法构建三维地图

热门文章

  1. 多线激光雷达~三维建图
  2. 负载均衡算法-响应速度均衡
  3. 嵌入式系统学习笔记之五-- uboot常用命令 概述
  4. c if 判断select已经选择的值_Golang语言基础教程:if分支语句
  5. 计算密码子频率的代码R语言_密码子使用频率表
  6. 动态内存分配与柔性数组
  7. C#Winform自动检测版本更新,下载最新版本
  8. 计算机书籍-Go语言入门经典SAMS Teach Yourself
  9. 基于双目视觉的目标检测与追踪方案详解
  10. 双目立体匹配算法:Patch Match Stereo实用详解教程