首先看看报错信息
我的python版本是3.8版本,试了网上加各种办法后 发现不行。
然后怀疑是系统本身的问题,就下载了visual studio ,用其中的dumpbin 一查,发现果然少了一个dll文件。
详细步骤:
1.下载并安装visual studio
2.找到开发者命令工具,并打开
3. 在打开的控制台上输入命令
【dll文件 需要换成你自己的目录】
dumpbin /DEPENDENTS D:\sofeware\anaconda\envs\python38\Lib\site-packages\PySmartCard\ReaderLib_64.dll
这一步返回的结果
发现有四个dll文件,然后去 C:\Windows\System32 下面依次的找这四个文件(也可以下载一个everything工具,只要显示System32路径下有这个文件就行)
我的电脑中发现缺少mfc100.dll文件,于是在网上找到可信的这个文件,下载到System32路径下。
最后解决了问题。
【注意: 这个解决方法仅适用于dll文件缺少依赖时使用,如果你查询后发现依赖库都有,那么需要另找解决办法】
- FileNotFoundError constructor dll 模块 ctypesfilenotfounderror constructor dll模块 filenotfounderror dependencies constructor路径 ctypes python gcc dll 模块 接口 方式dll filenotfounderror filenotfounderror directory errno such filenotfounderror startupinfo winerror错误 filenotfounderror 39 590230781 png ctypes ctype