我正在嘗試完成Exercise 47的Learn Python The Hard Way,第二版,但我在運行tests/ex47_tests.py
時收到此錯誤:「ImportError:No module named」error does not seem to be related to my code
File "tests/ex47_tests.py", line 3, in <module>
from ex47.game import Room
ImportError: No module named ex47.game
我認爲這是我在我的代碼中做錯了,因爲我在這個非常新,所以我克隆this repo從誰似乎已經成功地完成了鍛鍊GitHub的用戶。
不僅我們的代碼的相關部分是相同的,而且當我嘗試運行我從他克隆的tests/ex47_tests.py
時收到相同的錯誤。所以現在我迷路了,希望有人爲我解決問題。有任何想法嗎?
非常感謝你花時間寫這篇文章。 – Corey
編輯文本以刪除sys.path/PYTHONPATH混合(將在審查後顯示)。 –