Stan.jl warning

Hi everyone,

When I load Stan.jl, I receive the following message:
WARNING: using Stan.CMDSTAN_HOME in module Main conflicts with an existing identifier.

I had created a .juliarc.jl file containing the statement:
CMDSTAN_HOME = “C:\Users\USERNAME\CmdStan” (I’m using Windows 10)
as stated in the Stan.jl documentation for setting up CmdStan.

What does this warning mean and is there a way to fix it? Considering it’s a warning and not an error, do I need to be concerned with it at all?

Looking at the Stan.jl source code, I think this probably isn’t something you need to worry about. But I think you can make the error go away by setting an environment variable rather than creating a global Julia variable. That would mean changing your .juliarc.jl command to:

ENV["CMDSTAN_HOME"] = "C:\Users\USERNAME\CmdStan"

does that work? And does it get rid of the warning?

BTW, the relevant lines are here: https://github.com/goedman/Stan.jl/blob/ef6b07f43f575cad5b8d40e0953e013ab7def64c/src/Stan.jl#L12

Thanks for jumping in Robin!

Hi Eric,

We’ve gone through several iterations on how to set this up in such a way that it works across platforms. Clearly it still isn’t correct.

Before changing anything, let’s see if Robin’s suggestion works. If so, maybe I should just update the documentation.

Does Pkg.test(“Stan”) work ok for you?

Regards,
Rob

Thanks for the help!

Robin - your suggestion did remove the warning message, thanks.

Rob - I got errors when I ran Pkg.test(“Stan”). When that command is executed, is it running the same model as used in the walkthrough example provided in the documentation? I was trying to run that code in a Jupyter notebook and was receiving errors - I think the same as I had gotten with Pkg.test(“Stan”).

I can post the output files if that would help.

Hi Eric,

would it be possible to switch to https://github.com/goedman/Stan.jl/issues/47 https://github.com/goedman/Stan.jl/issues/47 ? I have copied the thread so far.

Yes, I definitely need to see the error messages and versions you are using (I assuming Julia 0.6 and Stan.jl 2.0.0).

The first step is to see if CmdStan works.

Regards,
Rob

Hi Rob,

I posted to GitHub as you requested.

Best,
Eric