0

I have a python file which uses custom bokeh extensions to generate surface3d plots and convert them to png using export_png. The executable runs successfully on my current system but I get the following error when I move it to a system without anaconda. RuntimeError: node.js v10.13.0 or higher is needed to allow compilation of custom models (“conda install nodejs” or follow https://nodejs.org/en/download/) [6128] Failed to execute script CMM

I use the following libraries in my code:

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

I need a standalone executable. Is there a way to have pyinstaller include this while generating the executable? This is the code I used to generate the exe file:

pyinstaller --hidden-import=pkg_resources.py2_warn --onefile Q:\Test\CMM.py
Ray234
  • 173
  • 5
  • 15
  • Does this answer your question? [How to include an executable file in setup.py](https://stackoverflow.com/questions/51429740/how-to-include-an-executable-file-in-setup-py) – Marc Sances Aug 19 '20 at 19:39
  • I want to force include nodejs to be included when I convert my .py file into an executable so that no libraries need to be installed separately when running the executable. Not sure how I would do that with this? – Ray234 Aug 19 '20 at 20:06
  • node is a dependency of bokeh. You're not going to be able to run your program in an environment that doesn't have node installed. You could modify your script to check if node is installed, and if not, run some node installer that you bundle in your program. Or you could specify to users that they need to install node before trying to run your script. This would be a more standard solution. – Charles Desbiens Aug 19 '20 at 22:42

0 Answers0