简体   繁体   English

安装keras和tensorflow之后,python脚本因Segmentation Fault(崩溃的核心)崩溃

[英]After installing keras and tensorflow, python script crashes with Segmentation Fault (core dumped)

在此处输入图片说明 Why does import statement (eventually leading to keras import) work only after handling a deliberate exception??????? 为什么只有在处理了故意的异常之后,import语句(最终导致keras导入)才起作用?

I have a python3.5 project with multiple main.py entry points. 我有一个带有多个main.py入口点的python3.5项目。

One entry point runs on server, another on client(s) using pycos to communicate (network IPC). 一个入口点在服务器上运行,另一个入口点在客户端上使用pycos进行通信(网络IPC)。

My server/main.py used to execute fine, but after installing keras and tensorflow with 我的server / main.py过去执行得很好,但是在安装keras和tensorflow之后

pip install -r requirements.txt --user

the server/main.py crashes reading 服务器/ main.py崩溃读取

Using TensorFlow backend.
Segmentation fault (core dumped)

I have monitored RAM on the server VM, hard disk space and nothing indicates why server/main.py is crashing... It doesn't even import keras OR tensorflow in the import trace. 我已经监视了服务器VM上的RAM,硬盘空间,但没有任何迹象表明server / main.py崩溃的原因... 它甚至没有在导入跟踪中导入keras或tensorflow。 I guess _ init _.py import trace eventually leads to the module which imports keras / tensorflow packages 我猜_ init _.py导入跟踪最终会导致导入keras / tensorflow包的模块

Can anyone advise on how to find the issue? 谁能建议如何找到问题?

requirements.txt requirements.txt

jsonpickle
matplotlib
seaborn
numpy
pycos
jsonpickle
statsmodels
pandas
sklearn
pymongo
keras
tensorflow==2.0.0-beta1

Turns out pycos executes an underlying scheduler which somehow interferes with Tensorflow (causing seg faults) if the python modules which call pycos are exposed in the _ _ init _ _.py of their respective python sub-packages. 事实证明,如果调用pycos的python模块暴露在各自python子包的_ _ init _ _.py中,则pycos执行一个底层的调度程序,该调度程序会以某种方式干扰Tensorflow(导致seg错误)。

Removing monitoringSimulation/monitor.py etc.. imports from monitoringSimulation/ _ _ init _ _.py fixes the issue. 从monitoringSimulation / _ _ init _ _ _.py中删除monitoringSimulation / monitor.py等导入可以解决此问题。

Will submit a bug to pycos as I will eventually need to expose monitor.py module to other subpackages. 会向pycos提交错误,因为我最终需要将monitor.py模块暴露给其他子软件包。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装 python-openstackclient 时出现分段错误(核心转储) - Segmentation fault(core dumped) while installing python-openstackclient biosig python3 - 分段错误(核心已转储) - biosig python3 - Segmentation fault (core dumped) python 3.6 因分段错误而意外停止(核心转储) - python 3.6 stopped unexpectedly with segmentation fault (core dumped) 尝试在 python 中使用子进程时出现分段错误(核心已转储) - Segmentation fault (core dumped) when trying to use subprocess in python 分段错误(核心已转储)以及如何设置新的python环境 - Segmentation fault (core dumped) and how to setup new python environments PyQt5中的分段错误(核心转储)错误 - Segmentation fault (core dumped) Error in PyQt5 分段错误:将TensorFlow脚本从Python 3反向移植到Python 2后出现11 - Segmentation fault: 11 after back-porting TensorFlow script from Python 3 to Python 2 无法在 python 中将 azure.cognitiveservices.speech 作为 Speechsdk 导入(Azure 函数)错误(分段错误(核心转储)) - Not able to import azure.cognitiveservices.speech as speechsdk in python (Azure functions) Error (Segmentation fault (core dumped)) Boost.Python Hello_world 示例中的“分段错误(核心转储)”错误 - “Segmentation fault (core dumped)” Error in Boost.Python Hello_world example Lambda Python 错误:运行时退出错误:信号:分段错误(核心转储)Runtime.ExitError - Lambda Python Error: Runtime exited with error: signal: segmentation fault (core dumped) Runtime.ExitError
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM