Python Forum
PyInstaller and RStudio conflict
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyInstaller and RStudio conflict
#1
I am using pyinstaller to generate an executable.
However, pyinstaller fails to complete, leaving a broken file. It refers to 'usr/lib/rstudio/qt.conf'. Removing RStudio resolves the problem, but I don't really want to do this every time I need to update the executable or add something to it. I believe it is wrongly taking this qt.conf file when generating the executable?

This is the output from the terminal after running: pyinstaller excel_splitter.py --hidden-import='packaging.specifiers' --hidden-import='packaging.requirements' --exclude-module matplotlib

Output:
23 INFO: PyInstaller: 3.4 23 INFO: Python: 3.7.3 23 INFO: Platform: Linux-4.19.49-1-MANJARO-x86_64-with-arch-Manjaro-Linux 23 INFO: wrote /home/cypher/PyCharm/excel_splitter/excel_splitter.spec 24 INFO: UPX is not available. 25 INFO: Extending PYTHONPATH with paths ['/home/cypher/PyCharm/excel_splitter', '/home/cypher/PyCharm/excel_splitter'] 25 INFO: checking Analysis 25 INFO: Building Analysis because Analysis-00.toc is non existent 25 INFO: Initializing module dependency graph... 28 INFO: Initializing module graph hooks... 30 INFO: Analyzing base_library.zip ... 1914 INFO: Analyzing hidden import 'packaging.specifiers' 1947 INFO: Analyzing hidden import 'packaging.requirements' 2133 INFO: Processing pre-safe import module hook six.moves 2158 INFO: running Analysis Analysis-00.toc 2176 INFO: Caching module hooks... 2178 INFO: Analyzing /home/cypher/PyCharm/excel_splitter/excel_splitter.py 2225 INFO: Processing pre-find module path hook distutils 3467 INFO: Processing pre-safe import module hook win32com 3604 INFO: Processing pre-find module path hook site 3605 INFO: site: retargeting to fake-dir '/usr/lib/python3.7/site-packages/PyInstaller/fake-modules' 18584 INFO: Loading module hooks... 18584 INFO: Loading module hook "hook-numpy.core.py"... 18640 INFO: Loading module hook "hook-PyQt5.py"... 23910 INFO: Loading module hook "hook-pkg_resources.py"... 23910 INFO: Loading module hook "hook-IPython.py"... 23916 INFO: Excluding import 'PyQt5' 23920 INFO: Excluding import 'PyQt4' 23923 INFO: Excluding import 'PySide' 23926 INFO: Excluding import 'matplotlib' 23929 INFO: Removing import of matplotlib from module IPython.core.pylabtools 23930 INFO: Excluding import 'gtk' 23933 INFO: Loading module hook "hook-PIL.py"... 23935 INFO: Excluding import 'PySide' 23937 INFO: Removing import of PySide from module PIL.ImageQt 23937 INFO: Excluding import 'PyQt4' 23939 INFO: Removing import of PyQt4 from module PIL.ImageQt 23939 INFO: Excluding import 'PyQt5' 23941 INFO: Removing import of PyQt5.QtGui from module PIL.ImageQt 23941 INFO: Removing import of PyQt5.QtCore from module PIL.ImageQt 23941 INFO: Excluding import 'tkinter' 23942 INFO: Import to be excluded not found: 'FixTk' 23942 INFO: Loading module hook "hook-scipy.linalg.py"... 23943 INFO: Loading module hook "hook-distutils.py"... 23945 INFO: Loading module hook "hook-jinja2.py"... 23955 INFO: Loading module hook "hook-pydoc.py"... 23956 INFO: Loading module hook "hook-scipy.sparse.csgraph.py"... 23958 INFO: Loading module hook "hook-PyQt5.QtCore.py"... 23975 WARNING: Unable to find Qt5 translations /usr/share/qt/translations/qtbase_*.qm. These translations were not packaged. 23976 INFO: Loading module hook "hook-_tkinter.py"... 24033 INFO: checking Tree 24033 INFO: Building Tree because Tree-00.toc is non existent 24033 INFO: Building Tree Tree-00.toc 24037 INFO: checking Tree 24037 INFO: Building Tree because Tree-01.toc is non existent 24037 INFO: Building Tree Tree-01.toc 24039 INFO: Loading module hook "hook-scipy.special._ufuncs.py"... 24039 INFO: Loading module hook "hook-xml.dom.domreg.py"... 24040 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"... 24081 WARNING: Unable to find Qt5 translations /usr/share/qt/translations/qtbase_*.qm. These translations were not packaged. 24082 INFO: Loading module hook "hook-PIL.Image.py"... 24285 INFO: Loading module hook "hook-jedi.py"... 24287 INFO: Loading module hook "hook-pygments.py"... 25268 INFO: Loading module hook "hook-sqlalchemy.py"... 25376 INFO: Found 4 sqlalchemy hidden imports 25376 WARNING: Hidden import "MySQLdb" not found! 25377 WARNING: Hidden import "psycopg2" not found! 25918 WARNING: Hidden import "sqlalchemy.sql.functions.func" not found! 25920 INFO: Import to be excluded not found: 'sqlalchemy.testing' 25920 INFO: Loading module hook "hook-lxml.etree.py"... 25921 INFO: Loading module hook "hook-lib2to3.py"... 25922 INFO: Loading module hook "hook-openpyxl.py"... 25924 INFO: Loading module hook "hook-encodings.py"... 25957 INFO: Loading module hook "hook-PyQt5.QtGui.py"... 25991 WARNING: Unable to find Qt5 translations /usr/share/qt/translations/qtbase_*.qm. These translations were not packaged. 25992 INFO: Loading module hook "hook-setuptools.py"... 26034 INFO: Loading module hook "hook-scipy.py"... 26035 INFO: Loading module hook "hook-pycparser.py"... 26035 INFO: Loading module hook "hook-xml.py"... 26036 INFO: Loading module hook "hook-sysconfig.py"... 26040 INFO: Loading module hook "hook-sqlite3.py"... 26072 INFO: Loading module hook "hook-pandas.py"... 26567 INFO: Loading module hook "hook-tables.py"... 26568 INFO: Loading module hook "hook-pytz.py"... 26578 INFO: Loading module hook "hook-xml.etree.cElementTree.py"... 26578 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"... 26583 INFO: Import to be excluded not found: 'FixTk' 26583 INFO: Excluding import 'tkinter' 26585 INFO: Loading module hook "hook-scipy.special._ellip_harm_2.py"... 26586 INFO: Loading module hook "hook-numpy.py"... 26586 INFO: Loading module hook "hook-appdirs.py"... 26590 INFO: Excluding import 'win32com' 26591 INFO: Removing import of win32com from module appdirs 26638 INFO: Looking for ctypes DLLs 26680 WARNING: library user32 required via ctypes not found 26903 INFO: Analyzing run-time hooks ... 26921 INFO: Including run-time hook 'pyi_rth__tkinter.py' 26922 INFO: Including run-time hook 'pyi_rth_multiprocessing.py' 26924 INFO: Including run-time hook 'pyi_rth_pkgres.py' 26925 INFO: Including run-time hook 'pyi_rth_traitlets.py' 26925 INFO: Including run-time hook 'pyi_rth_qt5.py' 26950 INFO: Looking for dynamic libraries ldd: warning: you do not have execution permission for `/usr/lib/libgcc_s.so.1' ldd: warning: you do not have execution permission for `/usr/lib/libimagequant.so.0' 34139 INFO: Looking for eggs 34139 INFO: Using Python library /usr/lib/libpython3.7m.so.1.0 34173 INFO: Warnings written to /home/cypher/PyCharm/excel_splitter/build/excel_splitter/warn-excel_splitter.txt 34294 INFO: Graph cross-reference written to /home/cypher/PyCharm/excel_splitter/build/excel_splitter/xref-excel_splitter.html 34349 INFO: checking PYZ 34349 INFO: Building PYZ because PYZ-00.toc is non existent 34349 INFO: Building PYZ (ZlibArchive) /home/cypher/PyCharm/excel_splitter/build/excel_splitter/PYZ-00.pyz 36028 INFO: Building PYZ (ZlibArchive) /home/cypher/PyCharm/excel_splitter/build/excel_splitter/PYZ-00.pyz completed successfully. 36056 INFO: checking PKG 36056 INFO: Building PKG because PKG-00.toc is non existent 36056 INFO: Building PKG (CArchive) PKG-00.pkg 36084 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully. 36085 INFO: Bootloader /usr/lib/python3.7/site-packages/PyInstaller/bootloader/Linux-64bit/run 36085 INFO: checking EXE 36085 INFO: Building EXE because EXE-00.toc is non existent 36085 INFO: Building EXE from EXE-00.toc 36085 INFO: Appending archive to ELF section in EXE /home/cypher/PyCharm/excel_splitter/build/excel_splitter/excel_splitter 36105 INFO: Building EXE from EXE-00.toc completed successfully. 36108 INFO: checking COLLECT 36108 INFO: Building COLLECT because COLLECT-00.toc is non existent 36108 INFO: Building COLLECT COLLECT-00.toc Security-Alert: try to store file outside of dist-directory. Aborting. '/usr/lib/rstudio/bin/qt.conf'
Reply
#2
Quote:36085 INFO: Appending archive to ELF section in EXE /home/cypher/PyCharm/excel_splitter/build/excel_splitter/excel_splitter
36105 INFO: Building EXE from EXE-00.toc completed successfully.
36108 INFO: checking COLLECT
36108 INFO: Building COLLECT because COLLECT-00.toc is non existent
36108 INFO: Building COLLECT COLLECT-00.toc
looks like it was successful the last line is just a warning.
do you have a folder named dist???? is your executable program the folder???
mine is in my home directory by default
Reply
#3
[/quote]
do you have a folder named dist???? is your executable program the folder???
mine is in my home directory by default
[/quote]

Yes, dist and build folders and both generated. The executable is in the folder but doesn't work. When I remove RStudio, run the installer again, the executable works flawlessly.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Folium: Conflict with Font Awesome Kit jgomes_eu 0 1,182 Apr-23-2022, 03:18 PM
Last Post: jgomes_eu
  How to order the Cronjobs to avoid overlap or conflict sadhaonnisa 1 1,791 Oct-10-2020, 10:26 AM
Last Post: DeaD_EyE
  possible ctypes and numpy conflict? herbal_rage 0 3,094 Apr-16-2020, 11:35 AM
Last Post: herbal_rage
  Python 2.7 Import error. Directory and filename conflict petcoo00 2 2,335 Feb-02-2020, 08:46 PM
Last Post: snippsat
  Conflict? Why? bkpsusmitaa 2 2,717 Sep-28-2018, 06:02 AM
Last Post: bkpsusmitaa

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020