为什么Gambit博弈论的代码不使用python脚本?

2024-06-01 08:04:25 发布

您现在位置:Python中文网/ 问答频道 /正文

游戏1.py:

import gambit
import gambit.nash

def play():
    g=gambit.read_game("4X3.nfg")
    solver=gambit.nash.ExternalLogitSolver()
    solver.solve(g)
    return

play()

这是我显示错误的代码:

/usr/lib/python2.7/site-packages/setuptools-5.7-py2.7.egg/pkg_resources.py:1049: UserWarning: /home/raja/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).

如果我在python控制台中运行相同的代码,并且没有出现任何错误。。在


Tags: 代码pyimportgame游戏readplaydef