Salvatore DI DIO
Salvatore DI DIO

Reputation: 211

Packaging PySide with PyInstaller

I am trying to package a pyside + QML application within a single file. When I run the executable I get this error

ImportError: could not import module 'PySide.QtNetwork'
Fatal Python error: can't initialize module QtDeclarative

Does someone have a clue ?

PS : I am on Windows

Upvotes: 1

Views: 2114

Answers (2)

Raphael Matto
Raphael Matto

Reputation: 31

Just want to say this solved an issue I had packaging a pySide application with pyImporter. I was getting this error:

Traceback (most recent call last): File "", line 93, in File "c:\Users\Rizzo the Rat\Desktop\PyInstaller-2.1\PyInstaller\loader\pyi_importers.py", line 409, in load_module module = imp.load_module(fullname, fp, filename, self._c_ext_tuple) ImportError: could not import module 'PySide.QtXml'

until I added this line:

from PySide import QtXml

Upvotes: 1

alex_1948511
alex_1948511

Reputation: 7339

try to import module explicity:

import PySide.QtNetwork

Upvotes: 3

Related Questions