Cannot get the NLopt example to work

I am trying to get the NLopt main example from the github page to work and I cannot. When I try on julia .6.2 I get this error:

type Opt has no field numevals

 [1] include_string(::String, ::String) at .\loading.jl:522
 [2] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\cpeac\.julia\v0.6\IJulia\src\execute_request.jl:193
 [3] (::Compat.#inner#6{Array{Any,1},IJulia.#execute_request,Tuple{ZMQ.Socket,IJulia.Msg}})() at C:\Users\cpeac\.julia\v0.6\Compat\src\Compat.jl:189
 [4] eventloop(::ZMQ.Socket) at C:\Users\cpeac\.julia\v0.6\IJulia\src\eventloop.jl:8
 [5] (::IJulia.##13#16)() at .\task.jl:335 

And when I try on juliabox 1.0.0 I get this error:

UndefVarError: optimize not defined

 [1] top-level scope at In[7]:26

If anyone can help please let me know.

The latest version of NLopt (the one described in the README) requires Julia 0.7 or later.

The README for the last version supported under Julia 0.6 is here:

And when I try on juliabox 1.0.0 I get this error:

I can’t reproduce the error message — I just tried, and the tutorial example works fine for me in Julia 1.0. Did using NLopt succeed? (i.e. have you actually installed the NLopt package successfully?)

1 Like


Okay thank you, I was using juliabox and it said the package was already installed and on top of that I added the package again and it seemed to work as it was supposed to. However I just restarted it a few times and started a new notebook and now it works so I’m sorry to have bothered you i guess I just needed to fiddle with it.

Thanks again