[Python, pip] AttributeError: module 'clr' has no attribute 'AddReference'

想使用 DLL 文件,
需使用 clr 內的 AddReference 的函式,
因此我下了這個指令 :
  • pip install clr
下了以後發現都會跑出 :
  • AttributeError: module 'clr' has no attribute 'AddReference'
原來會噴錯的原因是因為我裝了 'clr',
其實只要安裝pythonnet即可。
  • pip uninstall clr
  • pip install pythonnet

留言

這個網誌中的熱門文章

[CentOS, OpenCV] CentOS 7 安裝 OpenCV 3.4.5 (CentOS install OpenCV )

[CGAL, BOOST, C++, Visual Studio] Mutex is not supported when compiling with /clr or clr:pure