Coder Social home page Coder Social logo

Comments (16)

mherrmann avatar mherrmann commented on May 20, 2024 3

And you can also do python -m fbs freeze --debug to get more info when starting the app.

from fbs.

mherrmann avatar mherrmann commented on May 20, 2024 1

I strive to support every library. Just let me know when you start working on the other project.

from fbs.

mherrmann avatar mherrmann commented on May 20, 2024 1

To be perfectly direct: The information I need is that my efforts will not be in vain. You say now "it would be nice for maybe a project in the future". I could now spend days adding support for the libraries you mention (if they don't work already), just to have you simply never get around to actually using the fruits of my labor. That's why I want to know when you start using fbs in earnest.

from fbs.

mherrmann avatar mherrmann commented on May 20, 2024

Hi, does the problem also occur with vanilla (not conda) Python 3.5, PyQt 5.9.2 and PyInstaller 3.3.1?

from fbs.

boulund avatar boulund commented on May 20, 2024

Thanks @mherrmann!

The debug output shows (not surprisingly) that there appears to be an issue with pandas:

(pyqt_fbs) C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner>"CTMR list scanner.exe"
[18748] PyInstaller Bootloader 3.x
[18748] LOADER: executable is C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner\CTMR list scanner.exe
[18748] LOADER: homepath is C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner
[18748] LOADER: _MEIPASS2 is NULL
[18748] LOADER: archivename is C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner\CTMR list scanner.exe
[18748] LOADER: No need to extract files to run; setting extractionpath to homepath
[18748] LOADER: SetDllDirectory(C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner)
[18748] LOADER: Already in the child - running user's code.
[18748] LOADER: Python library: C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner\python35.dll
[18748] LOADER: Loaded functions from Python library.
[18748] LOADER: Manipulating environment (sys.path, sys.prefix)
[18748] LOADER: Pre-init sys.path is C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner\base_library.zip;C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner
[18748] LOADER: sys.prefix is C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner
[18748] LOADER: Setting runtime options
[18748] LOADER: Initializing python
[18748] LOADER: Overriding Python's sys.path
[18748] LOADER: Post-init sys.path is C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner\base_library.zip;C:\Users\fredr\Documents\Code\list_scanner\target\CTMR list scanner
[18748] LOADER: Setting sys.argv
[18748] LOADER: setting sys._MEIPASS
[18748] LOADER: importing modules from CArchive
[18748] LOADER: extracted struct
[18748] LOADER: callfunction returned...
[18748] LOADER: extracted pyimod01_os_path
[18748] LOADER: callfunction returned...
[18748] LOADER: extracted pyimod02_archive
[18748] LOADER: callfunction returned...
[18748] LOADER: extracted pyimod03_importers
[18748] LOADER: callfunction returned...
[18748] LOADER: Installing PYZ archive with Python modules.
[18748] LOADER: PYZ archive: out00-PYZ.pyz
[18748] LOADER: Running pyiboot01_bootstrap.py
[18748] LOADER: Running pyi_rth_multiprocessing.py
[18748] LOADER: Running pyi_rth_pkgres.py
[18748] LOADER: Running pyi_rth_win32comgenpy.py
[18748] LOADER: Running pyi_rth_qt5.py
[18748] LOADER: Running main.py
Traceback (most recent call last):
  File "site-packages\pandas\__init__.py", line 26, in <module>
  File "c:\users\fredr\appdata\local\conda\conda\envs\pyqt_fbs\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pandas\_libs\__init__.py", line 4, in <module>
  File "c:\users\fredr\appdata\local\conda\conda\envs\pyqt_fbs\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
    module = loader.load_module(fullname)
  File "pandas\_libs\tslibs\conversion.pxd", line 11, in init pandas._libs.tslib
  File "c:\users\fredr\appdata\local\conda\conda\envs\pyqt_fbs\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
    module = loader.load_module(fullname)
  File "pandas\_libs\tslibs\conversion.pyx", line 1, in init pandas._libs.tslibs.conversion
ImportError: No module named 'pandas._libs.tslibs.np_datetime'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 18, in <module>
  File "c:\users\fredr\appdata\local\conda\conda\envs\pyqt_fbs\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "sample_list.py", line 9, in <module>
  File "c:\users\fredr\appdata\local\conda\conda\envs\pyqt_fbs\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pandas\__init__.py", line 35, in <module>
ImportError: C extension: No module named 'pandas._libs.tslibs.np_datetime' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.
[18748] Failed to execute script main
[18748] LOADER: OK.
[18748] LOADER: Cleaning up Python interpreter.

I'm planning to get rid of the pandas dependency in the tool, so it's probably not the end of the world. I don't have more time to play around with this now, but I think I can handle it from here. Thanks for the help so far!

from fbs.

mherrmann avatar mherrmann commented on May 20, 2024

Ok cool. Happy to help :-)

from fbs.

boulund avatar boulund commented on May 20, 2024

@mherrmann By the way, is it to be expected that pandas would work with fbs?

I'm curious because I might have a need for it in another project.

from fbs.

boulund avatar boulund commented on May 20, 2024

@mherrmann What kind of information do you need? I could see myself using pandas for some lightweight data handling in a few applications for use here in the lab. I guess you could try whip up a simple application that just imports pandas and maybe plots a simple dataframe or something, that would be a great start!
For full usability to package small data analysis applications I would love to be able to easily import at least the basic science stack in python: numpy, scipy, pandas, matplotlib.

from fbs.

boulund avatar boulund commented on May 20, 2024

I absolutely understand your motivation, and I value your honesty 👍. I'm not going to make you start working on this before I really need it.

To be perfectly honest, in the particular situation that made me create this issue in the first place, I will most likely be able to easily replace pandas with e.g. xlread or openpyxl, since the only thing I really use pandas for in this project is convenience when reading tabular data from e.g. Excel files (they are abundant in the lab) or various CSV formats. This functionality is easy to replace in this project.

I'll make sure to create a new issue if/when I encounter issues with e.g. pandas in future projects! Thanks for your help so far.

from fbs.

mherrmann avatar mherrmann commented on May 20, 2024

Sounds good. Thanks!

from fbs.

hossiluc avatar hossiluc commented on May 20, 2024

check.txt

I'm having some problems where fbs run opens the program well, but when using fbs freeze the executable file is not working.

I've tried some of the tips on the website but still cant figure it out, any help will be appreciated

i'm attaching the output of fbs freeze --debug

from fbs.

mherrmann avatar mherrmann commented on May 20, 2024

You're using python version 3.7. Please try with 3.6. If the problem persists, please open a new issue.

from fbs.

woody0105 avatar woody0105 commented on May 20, 2024

@hossiluc
I am also having the same issue with python3.7. My freeze --debug log is exactly the same as your attached file.
I changed to python3.6 and the errors are gone but still having issues. when trying to execute app, i got alert saying:"failed to execute script main".
Anyone can help me fix the issue?

from fbs.

mherrmann avatar mherrmann commented on May 20, 2024

@huangsongfan Python 3.7 is not yet supported by fbs. Regarding your question for help, I suggest you ask on StackOverflow.

from fbs.

woody0105 avatar woody0105 commented on May 20, 2024

@mherrmann
Thank you.

from fbs.

minaee avatar minaee commented on May 20, 2024

I'm trying to create an executable file from the my PyQt5 application. my system specs:

ubuntu 18.04
python (3.6.9)
fbs (0.8.9)
matplotlib (3.3.0)
numpy (1.19.1)
pandas (1.1.0)

I'm following <a =href"https://github.com/mherrmann/fbs-tutorial">fbs-tutorial step by step to build a executable file from my application. I run the application without error with fbs run command.

The fbs freeze command produce this output:

-c:12: MatplotlibDeprecationWarning: 
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
Done. You can now run `target/DataVisualization/DataVisualization`. If
that doesn't work, see https://build-system.fman.io/troubleshooting.

But I'm importing version 5 of matplotlib.backends.backend_qt4agg in my code as:

from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar

The fbs freeze command produce this output:

-c:12: MatplotlibDeprecationWarning: 
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
Done. You can now run `target/DataVisualization/DataVisualization`. If
that doesn't work, see https://build-system.fman.io/troubleshooting.

But I'm importing version 5 of matplotlib.backends.backend_qt4agg in my code as:

from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar

when I run the executable file from

~/MyProject/target/AppName

I get this error:

./AppName 
Traceback (most recent call last):
  File "fbs_pyinstaller_hook.py", line 2, in <module>
  File "importlib/__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'fbs_runtime'
[1331] Failed to execute script fbs_pyinstaller_hook

what is the problem?

from fbs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.