当前位置:网站首页>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,再次运行成功。难道是我创建的虚拟环境有问题?欢迎指点。

边栏推荐
- [high concurrency] deeply analyze the callable interface
- AutoCAD - line width setting
- [MySQL] query valid data based on time
- Use of abortcontroller
- [interview questions] common interview questions (I)
- Talk about redis transactions
- Why can't the start method be called repeatedly? But the run method can?
- Great God developed the new H5 version of arXiv, saying goodbye to formula typography errors in one step, and the mobile phone can easily read literature
- In the past, domestic mobile phones were arrogant in pricing and threatened that consumers would like to buy or not, but now they have plummeted by 2000 for sale
- Synchronized与锁升级
猜你喜欢

Too many requests at once, and the database is in danger

How is the London Silver point difference calculated

HTTP Caching Protocol practice

Top ten Devops best practices worthy of attention in 2022

Pri3d: a representation learning method for 3D scene perception using inherent attributes of rgb-d data

R language error
![[xman2018 qualifying] pass](/img/eb/7bf04941a96e9522e2b93859266cf2.png)
[xman2018 qualifying] pass

基于Vue+Node+MySQL的美食菜谱食材网站设计与实现

QT 如何在背景图中将部分区域设置为透明
![[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
随机推荐
Reflection learning summary
Use of abortcontroller
Hyperledger Fabric 2. X custom smart contract
Integration of entry-level SSM framework based on XML configuration file
PostgreSQL 15新版本特性解读(含直播问答、PPT资料汇总)
Derivation of Halcon camera calibration principle
優雅的自定義 ThreadPoolExecutor 線程池
Leetcode 724. Find the central subscript of the array (yes, once)
What kind of experience is it to read other people's code
What is the London Silver code
Computer screen splitting method
Vscode uses yapf auto format to set the maximum number of characters per line
请求一下子太多了,数据库危
基于Vue+Node+MySQL的美食菜谱食材网站设计与实现
In the past, domestic mobile phones were arrogant in pricing and threatened that consumers would like to buy or not, but now they have plummeted by 2000 for sale
[microservices sentinel] hotspot rules | authorization rules | cluster flow control | machine list
Google tool splits by specified length
Naacl 2022 | TAMT: search the transportable Bert subnet through downstream task independent mask training
How QT sets some areas to be transparent in the background image
Experience sharing of mathematical modeling: comparison between China and USA / reference for topic selection / common skills