文章詳情頁
python - PyCharm 不能識別import路徑問題
瀏覽:132日期: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
相關(guān)文章:
1. 怎么在phpstudy中用phpexcel上傳數(shù)據(jù)到MYSQL?2. javascript - 百度搜索網(wǎng)站,如何讓搜索結(jié)果顯示一張圖片加上一段描述,如圖;求教3. phpadmin的數(shù)據(jù)庫,可以設(shè)置自動變化時間的變量嗎?就是不需要接收時間數(shù)據(jù),自動變化4. html5和Flash對抗是什么情況?5. 求救一下,用新版的phpstudy,數(shù)據(jù)庫過段時間會消失是什么情況?6. html - 爬蟲時出現(xiàn)“DNS lookup failed”,打開網(wǎng)頁卻沒問題,這是什么情況?7. mac里的docker如何命令行開啟呢?8. boot2docker無法啟動9. 這是什么情況???10. gosts內(nèi)容是空的
排行榜

熱門標簽