aroberge / easygui_qt

Inspired by easygui, designed for PyQt
BSD 3-Clause "New" or "Revised" License
61 stars 18 forks source link

easygui_qt.demos "Error importing PyQt5" #34

Closed melellington closed 3 years ago

melellington commented 3 years ago

All buttons in the demo give me the error:

Error importing PyQt5. Have you installed it? could not find function get_int

I am running Python version 3.9.0

imac:~ mel$ python -V Python 3.9.0

Screen Shot

aroberge commented 3 years ago

Look at the bottom of your screenshot: it shows that you are running Python version 2.7.

Note that I have not been working on this project for a few years now and I have very little free time to investigate problems.

melellington commented 3 years ago

If you look at the top of my screenshot My terminal command "python -V" shows I am running version 3.9.0.

Your demo code has a bug in it which forces it to run version 2.7.
overriding my default version 3.9.0.

Perhaps your code cannot handle newer versions of Python such as 3.9.0?

—Mel

On Apr 22, 2021, at 9:38 AM, André Roberge @.***> wrote:

Look at the bottom of your screenshot: it shows that you are running Python version 2.7.

Note that I have not been working on this project for a few years now and I have very little free time to investigate problems.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aroberge/easygui_qt/issues/34#issuecomment-824849327, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATHJFOIOI5HTXVGCK532K4DTKAREVANCNFSM43MPFJCQ.

aroberge commented 3 years ago

As I wrote in https://github.com/aroberge/easygui_qt/blob/master/setup.py, it was intended to run with Python 3, not Python 2. I did almost all my testing exclusively with Python 3.

The code on https://github.com/aroberge/easygui_qt/blob/master/easygui_qt/demos/launcher.py#L28 launches the default Python interpreter: it certainly does not force it to run a different version.

I don't have a mac but based on what I have read elsewhere, I suspect that, if you replace python by python3 on that line, the demo will work correctly on your computer.