文章詳情頁
python - PyCharm 不能識別import路徑問題
瀏覽:203日期:2022-06-29 16:25:43
問題描述
文件目錄
spider -models-test.py-customer.py
text.py
from customer import Customercustomer = Customer()
PyCharm會提示Unresolved reference ’customer’
程序運行沒問題
我想問下,如何讓編輯器正確識別路徑?
問題解答
回答1:from .customer imort Customer或者from models.customer import Customer回答2:
from models.customer import Customer
相關文章:
1. javascript - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. css - 寫頁面遇到個布局問題,求大佬們幫解答,在線等,急!~4. javascript - nodejs關于進程間發送句柄的一點疑問5. Apache 已經把網站根目錄的改為allow from all了,但是服務器還是不能訪問?6. 實現bing搜索工具urlAPI提交7. 配置Apache時,添加對PHP的支持時語法錯誤8. vue.js - Vue 如何像Angular.js watch 一樣監聽數據變化9. javascript - 移動端上不能實現拖拽布局嗎?10. phpstudy8.1支持win11系統嗎?
排行榜

網公網安備