Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: attempted relative import with no known parent package #11

Open
mwenge opened this issue Apr 7, 2021 · 3 comments
Open

Comments

@mwenge
Copy link

mwenge commented Apr 7, 2021

Hi there,

Getting the following error. Any suggestions?

[robert@mwenge-desktop python (master)]$ pwd
/home/robert/Dev/peasauce/python
robert@mwenge-desktop python (master)]$ python3 --version
Python 3.8.5
[robert@mwenge-desktop python (master)]$ python3 qtui.py 
Traceback (most recent call last):
  File "qtui.py", line 41, in <module>
    from . import disassemblylib
ImportError: attempted relative import with no known parent package
@rmtew
Copy link
Owner

rmtew commented Apr 8, 2021 via email

@migry
Copy link

migry commented May 30, 2021

I have the exact same issue (as of 30 May 2021) under Win10.

NOTE; tried to install python and Qt libraries under Ubuntu Linux and gave up in frustration. Win10 install was much easier.

I installed Python 3.9.5

BTW the instruction "pip install pyqt" (under the "Installation" section ) gave a very unhelpful error message in red. Wow must be serious! Hope my computer wasn't damaged :-)

I googled and tried instead "pip install PyQt5" which installed this library painlessly. The command "pip install QT.py" appeared to work.

Tried running from within the python directory and also (as suggested above) from the folder above. Same error each time.

Just as a rant, python is supposed to be some great language, especially for noobs to learn (such as me!), but when it goes wrong, the error messages might as well be printed in Klingon. I can see that this is a complicated and sophisticated project with lots of source files and other stuff. Does it really have to be this complicated, or should we (noobs) leave python only to the rocket scientist experts???

UPDATE: [5 minutes later...] So I executed the batch file "run.bat" and the GUI appears. So the instruction for "Method 1" might need to be amended, but it does say "any platform" and comes first which I why I tried this first!

Repository owner deleted a comment from napuzba Aug 8, 2021
@MrMisanthrope
Copy link

Same problem as of December 2023.
This may help others.

I managed to execute it with...

python3 -m python.qtui

...from the peasauce root directory and not in the python subdirectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants