ModuleNotFoundError: No module named 'httplib'
时间: 2023-08-23 13:15:28 浏览: 194
引用\[1\]中提到,当在Python3中遇到"ModuleNotFoundError: No module named 'httplib'"的错误时,可能是因为在Python3中,httplib包已经变成了http.client。所以,如果你仍然在代码中引入httplib库,就会报错。你可以将"import httplib"改为"from http import client"来解决这个问题。\[2\]
另外,引用\[3\]中提到的"RuntimeError: Model class djproject.models.TNsaeSslHost doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS"错误是由于在模型类djproject.models.TNsaeSslHost中没有声明明确的app_label,并且该模型类不在INSTALLED_APPS中的应用程序中。要解决这个问题,你需要在模型类中添加app_label属性,并将应用程序添加到INSTALLED_APPS中。
#### 引用[.reference_title]
- *1* [Python 3.X导入httplib、BaseHTTPServer模块报错解决方案](https://blog.csdn.net/ShiMengRan107/article/details/107767158)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [错误:ModuleNotFoundError: No module named ‘httplib](https://blog.csdn.net/Jason_WangYing/article/details/126660504)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [【Python2转换升级Python3异常错误更改】(三)](https://blog.csdn.net/hyf112233/article/details/128704014)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文