- 积分
- 22856
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-28
- 最后登录
- 1970-1-1
|
发表于 2020-6-13 11:51:42
|
显示全部楼层
用python3.7运行了demo_lighting_f-2.py文件,程序出错如下:
File "F:\lightning\demo_lighting_f-2.py", line 2, in <module>
clr.AddReferenceByPartialName("System")
AttributeError: module 'clr' has no attribute 'AddReferenceByPartialName'
请教大佬,出现这种问题应该怎么解决呢,网上查了资料,报错的原因是pip安装pythonnet时,使用了pip install clr命令。
因为虽然在程序里是import clr,但是安装的时候要使用pip install pythonnet。而不能使用pip install clr命令,否则就会安装另外一个名为clr但功能不同的python包。
我是用命令“pip install pythonnet”安装了pythonnet库的,但仍然是这种问题,不知道怎么办了 |
|