Running Julia script with predefined environment

There is probably some error in your code, but it is hard to be more specific without an MWE.