Permission denied on dl.open() with ipython but not with python

前端 未结 3 2042
梦谈多话
梦谈多话 2021-02-19 11:16

My initial goal is to open a dll file on Cygwin using ctypes. However I found some issues with it. I dug up to sys.dl which returns an unk

3条回答
  •  爱一瞬间的悲伤
    2021-02-19 11:23

    • Perhaps Python executable and IPython kernel use different manifest files which define loading policy?

    • Try appending the DLL path to sys.path in both cases.

    • Check admin rights (UAC) in both cases.

    • Use dependency walker to figure out dependencies of this DLL. Maybe the problem comes from dependencies?

    • Possibly your machine has multiple copies of this DLL?

    • Finally you can use Process Explorer to see the list of DLLs loaded in both cases and see any differences.

    I'm working on a very similar issue:

    ipython notebook & script difference - loading DLLs

提交回复
热议问题