点击启动Jupyter notebook的终端程序,终端上会记录Jupyter notebook的运行信息,可以从中查看错误原因
OMP: Error
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
[I 21:55:26.126 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
kernel 4e65633e-7300-4a63-a0fc-1df4e657672f restarted
解决:
在pytorch中导入以下模块:
import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
重新运行即可。
问题在Jupyter notebook中用matplotlib.pyplot出现服务器挂掉、崩溃import torchfrom torch.autograd import Variableimport matplotlib.pyplot as plttensor = torch.linspace(-6,6,200)tensor = Variable(tensor)np_data = tensor.numpy()#定义激活函数y_relu = torch.relu(tensor).data
import pandas as pd
import matplotlib.pyplot as plt
data = pd.read_csv('ccpoints.csv', header=0)
plt.scatter(data.x, data.y, c=red, marker='o', label='ccpoints')
plt.xlabel('x')
plt.ylabel('y')
plt.legend(loc=2)
plt.show()
点赞发Nature
关注中Science
问题:新装了一个anaconda虚拟环境,进而安装了jupyter notebook组件。但是发现无法从anaconda prompt启动jupyter notebook,报错(cannot connet to kernel balabala)如下:
Traceback (most recent call last):
File "D:\Users\sheep\Anaconda3\envs\fcLCA\lib\runpy.py", line 193, in _r
二、查看错误原因
点击启动Jupyter notebook的终端程序,终端上会记录Jupyter notebook的运行信息,可以从中查看错误原因
最后几行显示错误提示:
2019-12-11 13:47:43.930545: I tensorflow/stream_e...