当前位置:网站首页>【杂谈】Error loading psycopg2 module :No module named psycopg2
【杂谈】Error loading psycopg2 module :No module named psycopg2
2022-07-26 10:16:00 【炒扁豆】
- 在使用Django连接postgresql数据库的时候,使用
python manage.py migrate
创建数据库时提示:django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'
- 解决办法:
apt install psycopg2
如果失败了,不用管apt install libpq-dev
或者apt install postgresql-server-dev-X.Y
,必须安装成功其中之一pip install psycopg2
必须安装成功。- 最后记得给你的
setting.py
里面设置的数据库,设置一个访问密码,否则也会报错。
- 设置访问密码可以参考这里的相关命令。
边栏推荐
- Session based recommendations with recurrent neural networks
- INSTALL_ FAILED_ SHARED_ USER_ Incompatible error resolution
- 在.NET 6.0中配置WebHostBuilder
- 简单化构造函数的继承方法(一)- 组合继承
- Self encapsulated database dbutils universal template
- All codes of Tetris
- Keeping alive to realize MySQL automatic failover
- protobuf的基本用法
- 服务器内存故障预测居然可以这样做!
- Flask框架初学-03-模板
猜你喜欢
数通基础-TCPIP参考模型
数通基础-网络基础知识
Uniapp common error [wxml file compilation error]./pages/home/home Wxml and using MySQL front provided by phpstudy to establish an independent MySQL database and a detailed tutorial for independent da
What will the new Fuzhou Xiamen railway bring to Fujian coastal areas?
Docker configuring MySQL Cluster
protobuf的基本用法
Necessary for beginners: debug breakpoint debugging skills in idea and common breakpoint skills
AirTest
Principle analysis and source code interpretation of service discovery
Use of tabbarcontroller
随机推荐
Draw arrows with openlayer
The problem of four columns of Hanoi Tower
Use spiel expressions in custom annotations to dynamically obtain method parameters or execute methods
Learning about tensor (III)
详细解析js中的混合方式构造对象(构造加属性,原型加方法)
服务器内存故障预测居然可以这样做!
How to write a million reading article
面试第一家公司的面试题及答案(一)
Explain automatic packing and unpacking?
简单化构造函数的继承方法(一)- 组合继承
Map key not configured and uniapp routing configuration and jump are reported by the uniapp < map >< /map > component
Installation and use of cocoapods
面试突击68:为什么 TCP 需要 3 次握手?
Distributed network communication framework: how to publish local services into RPC services
Like, "new programmer" e-book is free for a limited time!
数通基础-网络基础知识
Show default image when wechat applet image cannot be displayed
Employee information management system based on Web
Study on the basis of opencv
面试突击68:为什么 TCP 需要 3 次握手?