1

I'm trying to convert a python script for qgis (2.18.2 Las Palmas) to executable (.exe) using pyinstaller

This is a very simple example (I'm just a beginner):

from qgis.core import *
import os
print "prova"

this is the coomand I use to convert esempio.py to esempio.exe:

pyinstaller esempio.py --onefile

when I run esempio.exe the following message appears:

Traceback (most recent call last):
  File "esempio.py", line 1, in <module>
  File "c:\progra~1\qgis2~1.18\apps\python27\lib\site-packages\PyInstaller-3.4-py2.7.egg\PyInstaller\loader\pyimod03_importers.py", line 395, in load_module
    exec(bytecode, module.__dict__)
  File "qgis\__init__.py", line 26, in <module>
  File "c:\progra~1\qgis2~1.18\apps\python27\lib\site-packages\PyInstaller-3.4-py2.7.egg\PyInstaller\loader\pyimod03_importers.py", line 395, in load_module
    exec(bytecode, module.__dict__)
  File "qgis\PyQt\QtCore.py", line 28, in <module>
ValueError: API 'QDate' has already been set to version 1
[10208] Failed to execute script esempio

Can someone help me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.