Failed to precompile ORCA

"’
using Plots,PlotlyJS
x=[1:10]
y=rand(10)
z=rand(10)
plot(x,y,z)
plotlyjs()
‘’’
Error:Failed to precompile ORCA [47be7bcc-f1a6-5447-8b36-7eeeff7534fd] to C:\Users\zlq.juliapro\JuliaPro_v1.4.2-1\compiled\v1.4\ORCA\jvX7k_F1Qj8.ji.
How could I solve this problem?

You shouldn’t need ORCA any longer.
Have you updated your packages to the latest versions. Also update Julia to 1.5 while you’re at it.

3 Likes

Yesterday I update the packages and Julia to 1.5.But


It shows me “UndefVarError: plot not defined”. What’s the problem?

I think that the problem is that you import functions called “plot” from both the Plots package, AND the PlotlyJS package. With two names for plot, you have to specify which package (actually module) you want to call it from by calling Plots.plot or PlotlyJS.plot.

Buuuut I suspect you are trying to use the Plots package, with plotlyjs as backend. This can be achieved by

using Plots
plotlyjs()

The function call “plotlyjs()” changes your backend.

1 Like

I want to rotate the 3D image arbitrarily so that I can see the other angles, so I try to use plotlyjs().
when Ichange the code like this:
using Plots,PlotlyJS
x=[1:10]
y=rand(10)
z=rand(10)
Plots.plot(x,y,z)
plotlyjs()
It shows me to add OCRA.


I follow it advice to implement in PlotlyBase.jl,
like this :
‘’’
using Plots,PlotlyBase
x=[1:10]
y=rand(10)
z=rand(10)
Plots.plot(x,y,z)
plotlyjs()
‘’’
It can run without errors,but can’t show the picture. What’s wrong?

No, rewrite it like this:

using Plots
plotly()         # without the js at the end, my bad. This changes your backend. All the backends are implemented in the Plots package
x=[1:10]
y=rand(10)
z=rand(10)
plot(x,y,z)
1 Like

Thank you very much~

You do want plotlyjs() I think?
Otherwise the plotting is being done over the web.

I do want to use plotlyjs( ). But when I use it by JuliaPro1.4.2-1, it shows me “Failed to precompile ORCA”.While JuliaPro 1.5.1-1 doesn’t show this problem.

If I want to realize rotate the 3D image arbitrarily by JuliaPro1.4.2-1, do you have other methord to achieve?
By now, when I run ‘‘plotly()’’ by JuliaPro1.4.2-1, it will advise me to build(“ORCA”), but after I build(“ORCA” ),it shows


So ,the plotly() or plotlyjs() can’t be used in JuliaPro1.4.2-1?
How could I realize rotate the 3D image arbitrarily by JuliaPro1.4.2-1

1 Like

If it works with Julia 1.5, just use 1.5?

2 Likes

It can run without any problem. But there are too many packages in my julia 1.4, if I turn to Julia1.5,I need add packages again,which will waste a lot of time.

Your packages should migrate without issue if you copy the .toml files from ~/.julia/environments/v1.4 to v1.5.

Although, I still get these warnings using the latest versions (Julia 1.5.1, PlotlyJS 0.14.0, Plotly v0.3.0, Plots 1.6.4).

using Plots
plotly()

[ Info: For saving to png with the Plotly backend ORCA has to be installed.

using Plots
plotlyjs()
WARNING: redefinition of constant known_mimetypes. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant singleton_instance. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant routing_callback. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant webio_server_config. This may fail, cause incorrect answers, or produce other errors.
ERROR: ArgumentError: Package ORCA not found in current path:
- Run `import Pkg; Pkg.add("ORCA")` to install the ORCA package.
 
Stacktrace:
[1] require(::Module, ::Symbol) at .\loading.jl:893
[2] top-level scope at C:\Users\nboyer.AIP\.julia\packages\Plots\4EfKl\src\backends.jl:491
[3] eval at .\boot.jl:331 [inlined]
[4] _initialize_backend(::Plots.PlotlyJSBackend) at C:\Users\nboyer.AIP\.julia\packages\Plots\4EfKl\src\backends.jl:490
[5] backend at C:\Users\nboyer.AIP\.julia\packages\Plots\4EfKl\src\backends.jl:174 [inlined]
[6] plotlyjs(; kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\nboyer.AIP\.julia\packages\Plots\4EfKl\src\backends.jl:31
[7] plotlyjs() at C:\Users\nboyer.AIP\.julia\packages\Plots\4EfKl\src\backends.jl:31
[8] top-level scope at REPL[4]:1
[9] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088

You can add PlotlyBase,then try this example
‘’’
using Plots #AbstractPlotting
plotly()
x=1:10
y=1:10
z=1:10
#Plots(x,y,f,st=:surface)
a=Plots.scatter(x,y,z)
plot(a)
‘’’

Could you tell me how to copy the .toml files from ~/.julia/environments/v1.4 to v1.5 .?

For the standard Julia installation, you can do this manually in Windows File Explorer. Look for two files named Manifest.toml and Project.toml in C:Users<username>.julia\environments\v1.4. The .julia folder is hidden by default (since it starts with a “.”), so you will need to check the “Hidden Items” checkbox under the “View” tab in File Explorer to see it. Copy those two files from the v1.4 to v1.5 folder and your packages should copy over. However, I don’t know if this works the same for JuliaPro.

To get the code formatting you wanted in your last post the triple apostrophies ‘’’ should be triple backticks ```. The backtick key is located above Tab on the U.S. keyboard.

Ok. Thank you for your reminding, I will pay attention to the code formatting next time.