我下载了Python for .NET。
在压缩包里有clr.pyd
、nPython.exe
、Python.Runtime.dll
和两个调试数据库文件。
我把clr.pyd和Python.Runtime.dll放到了我的Python DLLs目录C:\Python27\DLLs中,认为这就是安装所需的全部内容。然后我打开Python GUI并输入import clr,结果显示:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import clr
SystemError: dynamic module not initialized properly
我是 Python 的新手,但熟悉 .NET,希望使用 CPython 而不是 IronPython。这个安装过程中我遗漏了什么?Python for .NET 的自述文件称有适用于 Windows 的安装程序包,但我只找到了 zip 文件。