tutu3i 发表于 2021-5-15 16:41:50

这个错误怎么解决啊 NameError: name ‘random‘ is not defined

NameError: name ‘random‘ is not defined

还有这个
(base) D:\bishe\grasp_regression>python test_cornell.py
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
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/.

Twilight6 发表于 2021-5-15 18:45:42



报错是因为你 random 没有定义,可能是想用 random 模块你忘记导入了吧


柿子饼同学 发表于 2021-5-15 19:36:46

import random

tutu3i 发表于 2021-5-15 22:18:01

Twilight6 发表于 2021-5-15 18:45
报错是因为你 random 没有定义,可能是想用 random 模块你忘记导入了吧

不是啊 有 import random啊

tutu3i 发表于 2021-5-15 22:18:54

柿子饼同学 发表于 2021-5-15 19:36


有这个的

tutu3i 发表于 2021-5-15 22:22:43

柿子饼同学 发表于 2021-5-15 19:36


好了 多谢

tutu3i 发表于 2021-5-15 22:23:26

Twilight6 发表于 2021-5-15 18:45
报错是因为你 random 没有定义,可能是想用 random 模块你忘记导入了吧

好了 多谢
页: [1]
查看完整版本: 这个错误怎么解决啊 NameError: name ‘random‘ is not defined