Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Symptom¶
ImportError: Attempted Relative Import With No Known Parent Package
Solution¶
The best solution is to run the Python script as a Python module.
However,
you have to add the directory containing the Python module into the Python module search path first.
A simple way to do this is to define the PYTHONPATH environemnt variable.
:::bash
PYTHONPATH=/root/xinstall/ python3 -m xinstall.main -hReferences¶
ImportError: Attempted Relative Import With No Known Parent Package (Python)