无法执行脚本 fbs_pyinstaller_hook
Failed to execute script fbs_pyinstaller_hook
我正在尝试从我的 PyQt5 应用程序创建一个可执行文件。我的系统规格:
- ubuntu18.04
- python (3.6.9)
- fbs (0.8.9)
- matplotlib (3.3.0)
- numpy (1.19.1)
- pandas (1.1.0)
我正在按照 fbs tutorial 从我的应用程序构建可执行文件。我 运行 使用 fbs run
命令的应用程序没有错误。
fbs freeze
命令产生此输出:
-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.
但我在我的代码中导入了 matplotlib.backends.backend_qt4agg
的 5
版本:
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
当我运行可执行文件来自
~/MyProject/target/AppName
我收到这个错误:
./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
我已经检查了这些链接中给出的解决方案,但其中 none 派上了用场!
有什么想法吗?
我完全放弃了使用 FBS。pyinstaller 非常适合编译 PyQt5 代码。尝试只使用 pyinstaller 看看是否可行。
我正在尝试从我的 PyQt5 应用程序创建一个可执行文件。我的系统规格:
- ubuntu18.04
- python (3.6.9)
- fbs (0.8.9)
- matplotlib (3.3.0)
- numpy (1.19.1)
- pandas (1.1.0)
我正在按照 fbs tutorial 从我的应用程序构建可执行文件。我 运行 使用 fbs run
命令的应用程序没有错误。
fbs freeze
命令产生此输出:
-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.
但我在我的代码中导入了 matplotlib.backends.backend_qt4agg
的 5
版本:
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
当我运行可执行文件来自
~/MyProject/target/AppName
我收到这个错误:
./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
我已经检查了这些链接中给出的解决方案,但其中 none 派上了用场!
有什么想法吗?
我完全放弃了使用 FBS。pyinstaller 非常适合编译 PyQt5 代码。尝试只使用 pyinstaller 看看是否可行。