RuntimeWarning: Parent module '...' not found while handling absolute import

Pycharm 升級到最新版之後運行 unittest 報錯。python

報錯信息:

 RuntimeWarning: Parent module '...' not found while handling absolute importapp

 import sysRuntimeWarning: Parent module '...' not found while handling absolute importless

 import timeRuntimeWarning: Parent module '...' not found while handling absolute importide


這是一個已知問題,從2016.2版本就存在,目前爲止還沒解決。BUGspa

目前的解決辦法是使用舊的utrunner.py替換新的utrunner.py.net

解決辦法:

STEP1. 打開 pycharm 目錄code

open /Applications/PyCharm\ CE.app/Contents/helpers/pycharm11

STEP2. 下載舊的utrunner.pyblog

STEP3. 用舊的utrunner.py替換pycharm目錄下的utrunner.pyget

而後問題解決。pycharm


轉載自:http://blog.csdn.net/wirelessqa/article/details/53465854

相關文章
相關標籤/搜索