# Stan.jl warning

**URL:** <https://discourse.julialang.org/t/stan-jl-warning/5311>\
**Category:** General Usage\
**Created:** [August 9, 2017, 6:51pm UTC](https://discourse.julialang.org/t/stan-jl-warning/5311 "2017-08-09T18:51:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricChameroy](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@EricChameroy](https://discourse.julialang.org/u/EricChameroy)\
**Post date:** [August 9, 2017, 6:51pm UTC](https://discourse.julialang.org/t/stan-jl-warning/5311/1 "2017-08-09T18:51:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [August 9, 2017, 7:48pm UTC](https://discourse.julialang.org/t/stan-jl-warning/5311/2 "2017-08-09T19:48:55Z")

</div>

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:

```julia
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](https://github.com/goedman/Stan.jl/blob/ef6b07f43f575cad5b8d40e0953e013ab7def64c/src/Stan.jl#L12)

---

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [August 9, 2017, 10:43pm UTC](https://discourse.julialang.org/t/stan-jl-warning/5311/3 "2017-08-09T22:43:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EricChameroy](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@EricChameroy](https://discourse.julialang.org/u/EricChameroy)\
**Post date:** [August 10, 2017, 1:52am UTC](https://discourse.julialang.org/t/stan-jl-warning/5311/4 "2017-08-10T01:52:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [August 10, 2017, 2:16pm UTC](https://discourse.julialang.org/t/stan-jl-warning/5311/5 "2017-08-10T14:16:41Z")

</div>

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) [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

---

<div class="post-metadata">

**Author:** ![EricChameroy](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@EricChameroy](https://discourse.julialang.org/u/EricChameroy)\
**Post date:** [August 10, 2017, 7:18pm UTC](https://discourse.julialang.org/t/stan-jl-warning/5311/6 "2017-08-10T19:18:16Z")

</div>

Hi Rob,

I posted to GitHub as you requested.

Best,  
Eric
