# WARNING: Base.GLOBAL\_RNG is deprecated: it has been moved to the standard library package \`Random\`

**URL:** <https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852>\
**Category:** General Usage\
**Created:** [January 20, 2019, 8:41pm UTC](https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852 "2019-01-20T20:41:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [January 20, 2019, 8:41pm UTC](https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852/1 "2019-01-20T20:41:26Z")

</div>

```julia
Julia has exited. Press Enter to start a new session.
Starting Julia...
               _
   _ _ _(_)_ | A fresh approach to technical computing
  (_) | (_) (_) | Documentation: https://docs.julialang.org
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 0.7.0 (2018-08-08 06:46 UTC)
 _/ |\ __'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu

julia> using Random

julia> Base.GLOBAL_RNG
WARNING: Base.GLOBAL_RNG is deprecated: it has been moved to the standard library package `Random`.
Add `using Random` to your imports.
 in module Base
MersenneTwister(UInt32[0x551939b5, 0x30ebf9db, 0x8a89bfdd, 0xc06f42ad], Random.DSFMT.DSFMT_state(Int32[-1514060527, 1072828935, 798964544, 1073106308, 686496912, 1072959525, -156353866, 1072961088, -832773014, 1072880393 … 1004327676, 1073297540, -184450213, 1073579314, -52650434, 806077006, -1662434516, -106677665, 382, 0]), [1.54046, 1.6451, 1.36202, 1.65311, 1.88796, 1.91708, 1.86955, 1.65988, 1.43586, 1.13753 … 1.59987, 1.76979, 1.65074, 1.65116, 1.60697, 1.81886, 1.14073, 1.41917, 1.5763, 1.84502], UInt128[0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000 … 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000], 309, 0)

```

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [January 20, 2019, 9:15pm UTC](https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852/2 "2019-01-20T21:15:37Z")

</div>

What’s the issue?

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [January 20, 2019, 9:18pm UTC](https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852/3 "2019-01-20T21:18:43Z")

</div>

@carstenbauer, I have already used “using Random”, do I need to use “import Random” in order to use the “Base.GLOBAL\_RNG”?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [January 20, 2019, 9:24pm UTC](https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852/4 "2019-01-20T21:24:06Z")

</div>

Calling `Base.GLOBAL_RNG` still tries to access `GLOBAL_RNG` in the module `Base`, from which it was deprecated.

What are you actually trying to do? It might be helpful to consult the [Random](https://github.com/JuliaLang/julia/blob/a2e0b59f1cebfb6a3d800ed7d4f91464c618d18d/stdlib/Random/docs/src/index.md) docs

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [January 20, 2019, 9:25pm UTC](https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852/5 "2019-01-20T21:25:50Z")

</div>

@nilshg, I was trying to figure it out what’s going on. Thank you.

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [January 20, 2019, 9:31pm UTC](https://discourse.julialang.org/t/warning-base-global-rng-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19852/6 "2019-01-20T21:31:49Z")

</div>

I tested it again. This time,

```julia
using Random
Random.GLOBAL_RNG 

```

works.
