直接在命令行中录入
pip install pythonnet
会有一个ssl错误提示
...Could not fetch URL https://pypi.python.org/simple/pythonnet/: There was a problem confirming the ssl...
只好下载后再安装,下载地址
https://pypi.org/simple/pythonnet/
我的python是2.7的32位,于是下载了
pythonnet-2.3.0-cp27-cp27m-win32.whl
直接放在D盘,在命令行转到D盘,执行以下命令
pip install pythonnet-2.3.0-cp27-cp27m-win32.whl
安装成功,可以import clr啦:)