linux Pyre检查:验证错误- `eval`不是环境的一部分,搜索路径中没有模块`eval`

rbpvctlc  于 2023-08-03  发布在  Linux
关注(0)|答案(1)|浏览(130)

我正在尝试设置Pyre Check Pysa,就像官方教程中所描述的那样:https://github.com/facebook/pyre-check/tree/main/documentation/pysa_tutorial/exercise2
当运行pyre analyze时,我得到以下错误:

ƛ Found 2 model verification errors! 
sources_sinks.pysa:5:0 `eval` is not part of the environment, no module `eval` in search path.
sources_sinks.pysa:7:0 `subprocess.getoutput` is not part of the environment, no module `subprocess` in search path.

字符串
我已经扩展了`.pyre_configuration:

{
  "source_directories": [
    "."
  ],
  "taint_models_path": [
    "."
  ],
  "search_path": [
    "../../../stubs/",
    "~/.venvs/pysa/lib/python3.10/site-packages/",
    "~/.venvs/pysa/lib/pyre_check"
  ],
  "exclude": [
    ".*/integration_test/.*"
  ]
}


但没有用我能做些什么来让pysa运行?教程对你有用吗?
我在原生Ubuntu 22.04.2 LTS以及WLS Ubuntu-20.04上尝试了它。

zynd9foi

zynd9foi1#

使用以下命令应可解决此问题:

python3 -m venv tutorial

字符串
和/或

source tutorial/bin/activate

相关问题