Python:ImportError: No module named

简介: Python:ImportError: No module named

问题:

早PyCharm中调试项目,从项目的根目录引入其他模块,可以正常调试,


上线之后发现项目根目录没有添加到环境变量中,会报错:


ImportError: No module named

解决:

将顶层目录路径添加到Python路径

export PYTHONPATH=$PYTHONPATH:/root
相关文章
|
Python
python Module使用
【10月更文挑战第14天】 python Module使用
289 35
|
Linux Python
【Azure Function】Python Function部署到Azure后报错No module named '_cffi_backend'
ERROR: Error: No module named '_cffi_backend', Cannot find module. Please check the requirements.txt file for the missing module.
286 2
|
Python
Python中导入错误(ImportError)
【7月更文挑战第14天】
1045 11
|
数据处理 Python
【Python】解决tqdm ‘module‘ object is not callable
在使用tqdm库时遇到的“'module' object is not callable”错误,并给出了正确的导入方式以及一些使用tqdm的常见示例。
616 1
|
API 开发工具 Python
【Azure Developer】使用 Azure Python SDK时,遇见 The resource principal named https://management.azure.com was not found in the tenant China Azure问题的解决办法
【Azure Developer】使用 Azure Python SDK时,遇见 The resource principal named https://management.azure.com was not found in the tenant China Azure问题的解决办法
167 0
|
关系型数据库 MySQL Linux
【Azure 应用服务】[App Service For Linux(Function) ] Python ModuleNotFoundError: No module named 'MySQLdb'
【Azure 应用服务】[App Service For Linux(Function) ] Python ModuleNotFoundError: No module named 'MySQLdb'
133 0
|
数据挖掘 程序员 Python
【Python】已解决:ModuleNotFoundError: No module named ‘Workbook’
【Python】已解决:ModuleNotFoundError: No module named ‘Workbook’
386 0
|
开发者 Python
【Python】已解决:(pandas read_excel 读取Excel报错)ImportError: Pandas requires version ‘2.0.1’ or newer of ‘x
【Python】已解决:(pandas read_excel 读取Excel报错)ImportError: Pandas requires version ‘2.0.1’ or newer of ‘x
898 0
|
3月前
|
数据采集 机器学习/深度学习 人工智能
Python:现代编程的首选语言
Python:现代编程的首选语言
316 102
|
3月前
|
数据采集 机器学习/深度学习 算法框架/工具
Python:现代编程的瑞士军刀
Python:现代编程的瑞士军刀
344 104

推荐镜像

更多