This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ImportError: upon install and launch

After just now installing 3.0.2 and the MSVC 2013 rp, I run the launcher, nada.

From CMD:

C:\Program Files\Pathomx>python "C:\Program Files\Pathomx\Pathomx.launch.pyw"
Traceback (most recent call last):
  File "C:\Program Files\Pathomx\Pathomx.launch.pyw", line 21, in <module>
    from pathomx.Pathomx import main
  File "C:\Program Files\Pathomx\pkgs\pathomx\Pathomx.py", line 28, in <module>
    from .qt import *
  File "C:\Program Files\Pathomx\pkgs\pathomx\qt.py", line 47, in <module>
    from PyQt5.QtGui import *
ImportError: DLL load failed: %1 is not a valid Win32 application.

Suggestions?

software-error
Installing 3.0.2 of WHAT?

Python, hopefully ;)

Hello rjsdotorg!

We believe that this post does not fit the main topic of this site.

Not relevant, please ask StackOverflow

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

1 answer

Your .pyw files are set to open with IDLE or some such program on Windows. Change the file association to Python, and it should work.

3.02 is the Pathomx version, which I want to eval vs. Orange Canvas.

The Windows launcher lnk command line is

C:\Windows\pyw.exe "C:\Program Files\Pathomx\Pathomx.launch.pyw"

I already have Python 2.7 installed (and 3, I write Python code). If the Pathomx installer does not cooperate with pre-installed Python it would be helpful to know. I do not have QT or pySide on this machine as I usually use wx.

So renaming the py,exe and pyw.exe (so they are not found, and then attempting to launch from the usual Python command results in:

C:\Program Files\Pathomx\pkgs\pathomx>python "C:\Program Files\Pathomx\pkgs\pathomx\Pathomx.py"
Traceback (most recent call last):
  File "C:\Program Files\Pathomx\pkgs\pathomx\Pathomx.py", line 28, in <module>
    from .qt import *
ValueError: Attempted relative import in non-package

Using the installer-supplied pyx.exe exits silently (no log, although Pathomx.launch.py would make one think otherwise).

If I try the py.exe (to see a traceback) I get:

C:\Program Files\Pathomx\pkgs\pathomx>c:\windows\py.exe "C:\Program Files\Pathomx\pkgs\pathomx\Pathomx.py"
Traceback (most recent call last):
  File "C:\Program Files\Pathomx\pkgs\pathomx\Pathomx.py", line 28, in <module>
    from .qt import *
ValueError: Attempted relative import in non-package

Downloading and running source https://github.com/pathomx/pathomx/archive/master.zip fails due to obvious imports missing:

C:\temp\pathomx-master>python C:\temp\pathomx-master\Pathomx.py
Traceback (most recent call last):
  File "C:\temp\pathomx-master\Pathomx.py", line 7, in <module>
    from pathomx import Pathomx
  File "C:\temp\pathomx-master\pathomx\Pathomx.py", line 32, in <module>
    from IPython.qt.console.rich_ipython_widget import RichIPythonWidget
ImportError: No module named IPython.qt.console.rich_ipython_widget

Log in to answer this question.