c# - System.IO.FileNotFoundException:在语言的搜索路径中找不到“文件'Test.py':。”
问题描述
每当我运行此脚本时,都会收到以下错误:
System.IO.FileNotFoundException:在语言的搜索路径中找不到“文件'Test.py':。”
var ipy = Python.CreateRuntime();
dynamic test = ipy.UseFile("Test.py");
test.Simple();//Simple is a method in the python script
解决方案
您应该转到 Test.py 属性窗口并将“复制到输出目录”更改为“始终复制”。
推荐阅读
- apache - mod_rewrite 调试显示意外的 REWRITE_COND 事件顺序
- r - 如何从 1 df 的 i+1 列中获取值并计算到第 2 df 的 i+1 列中每一行的值的距离
- kotlin - Why is it not possible to use the constructor parameter (not property) directly as variables for a member function?
- vue.js - Vue 堆栈组件
- contiki - 在 TSCH 时间表上分离 RPL 和应用程序时隙 (Contiki-NG)
- python - 遍历一系列以查找值 >= x 然后使用值
- jsp - 将属性从 jsp 传递到 servlet
- php - 如何为 chrome 或 firefox Offline 安装 xdebug 扩展?
- c# - Unity C# - 与圆柱体的碰撞球体 - 不触发圆柱体的侧面
- sql - T-SQL 交叉表计数查询