ich ein Python-Projekt sieht wie folgt aus:Python-Import-Modul aus der relativen Paket
src
|
+---- __init__.py
|
+---- branch2
|
+----__init__.py
+----xx.py
|
+---- branch3
|
+---- __init__.py
+---- yy.py
Ich möchte eine Python-Datei in yy.py von einem Geschwister-Paket importieren:
from branch2 import xx
aber ich habe Fehler:
ImportError: No module named xx
ich bin sicher, dass jedes Paket eine init Py fi hat le, und meine Python-Version ist 2.7.10
Vielleicht [Antwort] (http://stackoverflow.com/a/10713254/4788274) hilft Ihnen ... –