To compile packages using PackageCompiler.jl I found the following steps to be helpful
- Update PakcageCompiler to latest using
- If you have compiled packages before then take care to restore to initial state by copying the sys.dll from
C:\Users\UserName\AppData\Local\Julia-1.1.0\lib\julia. You may need to shut down Julia to achieve this. If you had run Jupyter lab, you need to restart the computer
using Pkg; pkg"up"; using PackageCompiler compile_incremental(:Pkg1, :Pkg2, force = false)
- Once done, copy from
Do you have by chance any experience and or tips for the use of
build_executable() to generate a single stand-alone executable file on Windows?
I’m not a Windows expert but I have dabbled with PackageCompiler on Windows and have had some success with
build_executable. I would recommend looking at the example in the PackageCompiler repository examples folder. That helped me a lot. See if you can build that c program using PackageCompiler’s
The other thing to remember is that the executable will be standalone in the sense that you can run it without a working julia installation but you’ll still need all the julia dlls. Run
copy_julialibs = true to see which dlls you’ll need. If you want to run your executable on a machine without julia installed, you’ll have to copy all those dlls to the new machine as well as the exe file itself.
Here is my script to compile a Data Science super image on Windows. Unforutnately, CuArrays and DecisionTree don’t work yet. But the image covers most of my data science needs for now!
, :GR #ok
, :DataFrames #ok
, :DataFramesMeta #ok
, :StatsBase #start 10:05pm #ok
, :Query #start 10:22pm #ok # 1021
, :GLM # start 7:45pm #ok 1153
, :Clustering # start 8:44pm #ok 1268
, :TableReader # start 9:09pm # 1370
, :Flux # start 9:38pm # 1686
, :Lazy # start 10:07pm # 1751
, :Feather # start 8:01pm
#, :CuArrays # start 7:16pm #failed
#, :DecisionTree #start 8:10pm # failed
, force = false
Do you encounter this error on Windows?
┌ Warning: QuartzImageIO.jl can only be used on Apple macOS. Suggested usage is
│ @static if Sys.isapple()
│ using QuartzImageIO
│ # QuartzImageIO specific code goes here
└ @ QuartzImageIO C:\Users\xxx\.julia\packages\QuartzImageIO\9DhKg\src\QuartzImageIO.jl:723```
Yeah but I think it can be ignored
You can use the blacklist argument:
force = false, reuse = false, verbose = true,
debug = false, cc_flags = nothing
debug = false, cc_flags = nothing,
blacklist::Vector = 
:QuartzImageIO in the blacklist can avoid this warning message.