没有名为 psycopg2 的模块

编程入门 行业动态 更新时间:2024-10-26 23:41:29
本文介绍了没有名为 psycopg2 的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个使用 postgresql 9 的 Django 项目.我安装了 psycopg2,当我运行项目时,我收到错误加载 psycopg2 模块:dll 加载失败".我第一次遇到这个问题.我有带有 python2.7 的 Windows 7 x64.我该如何解决这个问题?

解决方案

我遇到了同样的问题,psycopg2 在 Windows 中使用 _easy_install_ 安装得不好,我按照以下说明进行操作所以答案:

在 windows 上的 virtualenv 中安装 psycopg2 (postgresql)

您需要手动安装psycopg2 exe 文件:

psycopg2-2.4.2.win-amd64-py2.7-pg9.0.4-release.exe

I have Django project which uses postgresql 9. I installed psycopg2 and when I run project I receive 'Error loading psycopg2 module: dll load failed'. I met this issue for the first time. I have windows 7 x64 with python2.7. How can I solve this one?

解决方案

I had the same problem, it was that psycopg2 does not install well in Windows with _easy_install_, I followed the instructions on the follow SO answer:

Installing psycopg2 (postgresql) in virtualenv on windows

You need to manually install the psycopg2 exe file:

psycopg2-2.4.2.win-amd64-py2.7-pg9.0.4-release.exe

更多推荐

没有名为 psycopg2 的模块

本文发布于:2023-10-24 02:59:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1522743.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!