python - 如何在可执行文件中包含nodejs?
问题描述
我有一个python文件,它使用自定义散景扩展来生成surface3d图并使用export_png将它们转换为png。可执行文件在我当前的系统上成功运行,但是当我将其移动到没有 anaconda 的系统时出现以下错误。RuntimeError:需要node.js v10.13.0或更高版本才能编译自定义模型(“conda install nodejs”或遵循https://nodejs.org/en/download/)[6128 ]无法执行脚本CMM
我在我的代码中使用以下库:
import scipy.linalg
import scipy.interpolate
import numpy as np
import csv
import pandas as pd
import glob
import fire
from bokeh.plotting import figure, output_file, save, show
from bokeh.layouts import gridplot, row, column
from bokeh.core.properties import Instance, String
from bokeh.models import ColumnDataSource, LayoutDOM, ColorBar, Div
from bokeh.util.compiler import TypeScript
import os
import sys
我需要一个独立的可执行文件。有没有办法让 pyinstaller 在生成可执行文件时包含它?这是我用来生成exe文件的代码:
pyinstaller --hidden-import=pkg_resources.py2_warn --onefile Q:\Test\CMM.py
解决方案
推荐阅读
- javascript - 打字稿,检查请求正文是否有用户类型,否则抛出错误
- c# - C#中的斐波那契
- react-native - 文本字符串必须在
零件。反应本机错误 - tensorflow - Keras 模型评估返回触发的 tf.function 回溯警告
- c# - 使用 MediatR 是否可以为任何和所有请求创建一个通用的 RequestExceptionHandler ?
- firebase - 即使我有一个 catch 块,getter 也被调用为 null
- python - 从我的本地计算机将我的 HTML 发布到 Mturk 沙箱中的 HIT
- javascript - 动态创建 li 元素的替代方法
- forms - PowerShell - DataGridView Windows 窗体拖放问题
- javascript - 将 React 应用程序发布到 Github 页面的问题