from psycopg2._psycopg import ( ortError: DLL load failed: 找不到指定的模块。的一种解决方案...

 from psycopg2._psycopg import ( ortError: DLL load failed: 找不到指定的模块。

 

psycopg2是python连接postgresql的适配器

如果您安装psycopg2模块成功,但是依旧还报上面的错误,原因可能是Python找不到postgresql的可执行模块dll了

 

把postgresql 的bin 和 lib加到系统路径里面可以解决这种问题

 

转载于:https://www.cnblogs.com/qianheng/p/6710123.html

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当在使用PyCharm时,出现"ImportError: DLL load failed while importing _psycopg: 不到指定模块"的错误提示时,可以尝试以下解决方法。首先,将PostgreSQL的bin和lib路径添加到系统的环境变量Path中。然后,使用以下命令来更新psycopg2插件: "pip install --upgrade psycopg2"。 另外,根据您电脑的具体情况,您可以选择下载适合您电脑位数的PostgreSQL安装文件。下载完成后,运行该exe文件,并选择修复选项。修复完成后,再次运行PyCharm中的代码,应该就不会再报错了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [PyCharm ImportError: DLL load failed while importing _psycopg: 不到指定模块。](https://blog.csdn.net/lsqtzj/article/details/109133152)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [当python导入包时,出现DLL load failed while impoting _path错误](https://blog.csdn.net/w1405270578/article/details/117598696)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值