PyCharm ImportError: DLL load failed while importing _psycopg: 找不到指定的模块。

错误:PyCharm  ImportError: DLL load failed while importing _psycopg: 找不到指定的模块。

解决方法: 把PostgreSQL 的 bin 和 lib 添加到Path,然后更新psycopg2插件

pip install --upgrade psycopg2

 

当在使用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 ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值