Key BlackBoxOptim not found

I think I have found the solution. The addprocs() function should be placed before loading all the other packages, so instead of putting the other packages outside the loop, my code should be like:

using Distributed
for i = 1:56
  addprocs(1)
    @everywhere using CSV
    @everywhere using Tables
    @everywhere using BlackBoxOptim
  println("Number of workers: ", nworkers())
  opt = bbsetup(BlackBoxOptim.rosenbrock; SearchRange = (-5.0, 5.0), Workers = workers(), NumDimensions = 20000, MaxFuncEvals = 10, TraceMode = :silent)
  el = @elapsed res = bboptimize(opt)
  t = round(el, digits=3)
  v = [i; t]
  println("workers: "v[1], "; time: ", v[2])
end