当前位置:网站首页>E ModuleNotFoundError: No module named ‘psycopg2‘(已解决)
E ModuleNotFoundError: No module named ‘psycopg2‘(已解决)
2022-06-27 15:23:00 【遗忘的迟来的风】
Hint: make sure your test modules/packages have valid Python names.
Traceback:
d:\software\python3.8\lib\importlib\__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test_case\test_case.py:6: in <module>
from common.connectpostgresql import Getresult
common\connectpostgresql.py:1: in <module>
import psycopg2
E ModuleNotFoundError: No module named 'psycopg2'
我使用了虚拟环境,虚拟环境中装了psycopg2,我单独运行导入psycopg2模块的那个文件能成功运行,但是在调用的文件中就报错。后来在本地环境中也装了psycopg2,再次运行成功。难道是我创建的虚拟环境有问题?欢迎指点。

边栏推荐
- [interview questions] common interview questions (I)
- [microservices sentinel] hotspot rules | authorization rules | cluster flow control | machine list
- Creation and use of static library (win10+vs2022
- Volatile and JMM
- AutoCAD - line width setting
- Knightctf 2022 web section
- 優雅的自定義 ThreadPoolExecutor 線程池
- 简析国内外电商的区别
- R language objects are stored in JSON
- 固收+产品有什么特点?
猜你喜欢

AI begets the moon, and thousands of miles share the literary heart
![[PHP code injection] common injectable functions of PHP language and utilization examples of PHP code injection vulnerabilities](/img/19/9827a5e8becfc9d5bf2f51bddf803e.png)
[PHP code injection] common injectable functions of PHP language and utilization examples of PHP code injection vulnerabilities

ThreadLocal之强、弱、軟、虛引用

R language error

直播app运营模式有哪几种,我们该选择什么样的模式?

volatile与JMM

隐私计算FATE-离线预测

Leetcode 724. Find the central subscript of the array (yes, once)

基于SSM的Web网页聊天室系统

Talk about redis transactions
随机推荐
Design and implementation of food recipe and ingredients website based on vue+node+mysql
External memory
February 16, 2022 freetsdb compilation and operation
NLP - monocleaner
Make a ThreadLocal (source code) that everyone can understand
Use of abortcontroller
Acwing game 57
Vscode uses yapf auto format to set the maximum number of characters per line
避孕套巨头过去两年销量下降40% ,下降原因是什么?
Massive data! Second level analysis! Flink+doris build a real-time data warehouse scheme
隱私計算FATE-離線預測
How to change a matrix into a triple in R language (i.e. three columns: row, col, value)
图书管理系统
Why can't the start method be called repeatedly? But the run method can?
Can the teacher tell me what the fixed income + products are mainly invested in?
Julia1.1 installation instructions
【微服务|Sentinel】热点规则|授权规则|集群流控|机器列表
R language objects are stored in JSON
Interpretation of new version features of PostgreSQL 15 (including live Q & A and PPT data summary)
Abnormal analysis of pcf8591 voltage measurement data