文章詳情頁
python - PyCharm 不能識(shí)別import路徑問題
瀏覽:105日期:2022-06-29 16:25:43
問題描述
文件目錄
spider -models-test.py-customer.py
text.py
from customer import Customercustomer = Customer()
PyCharm會(huì)提示Unresolved reference ’customer’
程序運(yùn)行沒問題
我想問下,如何讓編輯器正確識(shí)別路徑?
問題解答
回答1:from .customer imort Customer或者from models.customer import Customer回答2:
from models.customer import Customer
上一條:python selenium 獲取圖片驗(yàn)證碼下一條:python - 為什么用requests.get網(wǎng)址后,用.text響應(yīng)內(nèi)容為字典的形式,卻type它為str
相關(guān)文章:
1. node.js - mysql如何通過knex查詢今天和七天內(nèi)的匯總數(shù)據(jù)2. mysql 插入數(shù)值到特定的列一直失敗3. 360瀏覽器與IE瀏覽器有何區(qū)別???4. mysql - 百萬行的表中是否盡量避免使用update等sql語句?5. python - 在使用Pycharm時(shí)經(jīng)常看到如下的樣式,小括號(hào)里紅色的部分是什么意思呢?6. Python從URL中提取域名7. javascript - 新浪微博網(wǎng)頁版的字?jǐn)?shù)限制是怎么做的8. 怎么在網(wǎng)頁中設(shè)置圖片進(jìn)行左右滑動(dòng)9. javascript - 豆瓣的這個(gè)自適應(yīng)是怎么做的?10. javascript - 用jsonp抓取qq音樂總是說回調(diào)函數(shù)沒有定義
排行榜

熱門標(biāo)簽