{"url":"https://ttt24224222.hatenadiary.jp/entry/2017/07/17/185621","title":"ImportError: attempted relative import with no known parent package","height":"190","published":"2017-07-17 18:56:21","author_name":"ttt242242","image_url":null,"provider_url":"https://hatena.blog","version":"1.0","author_url":"https://blog.hatena.ne.jp/ttt242242/","categories":["python"],"blog_url":"https://ttt24224222.hatenadiary.jp/","description":"\u30bf\u30a4\u30c8\u30eb\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u308b\u5834\u5408\u306b\u306f\u3001\u3046\u307e\u304f\u30d1\u30b9\u306e\u8a2d\u5b9a\u304c\u3067\u304d\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3060\u3002 python3\u7cfb\u3067\u8d77\u304d\u308b\u3089\u3057\u3044\u3002 \u4e0a\u306e\u968e\u5c64\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u76f8\u5bfe\u30d1\u30b9\u3067\u6307\u5b9a\u3067\u304d\u306a\u3044\u305f\u3081\u306b\u51fa\u529b\u3055\u308c\u308b\u30a8\u30e9\u30fc\u306e\u3088\u3046\u3060\u3002 \u89e3\u6c7a\u6cd5 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u3092\u60f3\u5b9a\u3059\u308b\u3002 project \u251c\u2500main.py \u2514\u2500 mydir \u2514\u2500 test.py test.py\u304b\u3089main.py\u306eMain\u30af\u30e9\u30b9\u3092\u53c2\u7167\u3059\u308b\u306b\u306f\u3001\u7d76\u5bfe\u30d1\u30b9\u3067\u53c2\u7167\u3057\u3066\u3042\u3052\u308c\u3070\u826f\u3044 # test.py from project.main import Main","provider_name":"Hatena Blog","width":"100%","blog_title":"\u96d1\u591a\u306a\u6280\u8853\u7cfb\u30e1\u30e2","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fttt24224222.hatenadiary.jp%2Fentry%2F2017%2F07%2F17%2F185621\" title=\"ImportError: attempted relative import with no known parent package - \u96d1\u591a\u306a\u6280\u8853\u7cfb\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}