# Base.Pkg is deprecated, but \`using Pkg\` errors out

**URL:** https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573
**Category:** General Usage
**Created:** [March 7, 2018, 4:51pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573 "2018-03-07T16:51:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [March 7, 2018, 4:51pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573/1 "2018-03-07T16:51:45Z")

</div>

Getting this with Julia v0.7 nightly on MacOS:

```julia
julia> Pkg.WARNING: Base.Pkg is deprecated, run `using Pkg` instead
 in module Main
julia> using Pkg
ERROR: importing Pkg into Main conflicts with an existing identifier

```

Checked thoroughly but I haven’t seen this reported yet, strangely. Thought I should check if it’s a known issue before opening a new one on Julia’s Github repo.

```julia
julia> versioninfo()
Julia Version 0.7.0-DEV.4480
Commit fa462ba112 (2018-03-07 11:38 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)
Environment:

```

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [March 7, 2018, 5:21pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573/2 "2018-03-07T17:21:13Z")

</div>

Yeah, this is an awkward in-between state. The old names are still exported from `Base` to provide that re-direction and deprecation to the stdlib. If you do `using Pkg` then the stdlib names can gracefully layer on top and shadow the deprecations. Once you “touch” any of those bindings, though, then they’re unable to be shadowed anymore in your current session. I’m not aware of a workaround beyond restarting julia (or ignoring the deprecation message for the rest of that session).

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [March 7, 2018, 5:32pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573/3 "2018-03-07T17:32:27Z")

</div>

Just put `import Pkg` into `.julia/config/startup.jl`.

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [March 7, 2018, 6:38pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573/4 "2018-03-07T18:38:09Z")

</div>

Thank you. I’ve recently started testing out v0.7 but the changes are numerous and their impact quite far-reaching.

I’m in a special situation in that I have written 11 chapters of a beginner’s Julia book for the last 6 months, on v0.6.2. And I need to update the whole book to v0.7, for publishing, with the deadline at the end of the month. I’ve seen that some mainstream packages have been updated to support 0.7 but many still weren’t - most notably, so far, `IJulia` and `Gadfly` (which also holds back `DataFrames`, so it’s a special treat).

I really like the changes in 0.7 and where the whole ecosystem is heading, but in my particular case, these weeks are so frustrating.

![](https://global.discourse-cdn.com/julialang/original/3X/0/2/02fc6737bc67cc729d38fa4aeddbadb1e19cac72.jpeg)

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [March 7, 2018, 7:40pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573/5 "2018-03-07T19:40:43Z")

</div>

In my humble opinion that deadline is not reasonable. 0.7 is not even out yet and as you have probably felt, a lot of the ecosystem has some catching up to do.

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [March 7, 2018, 7:54pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573/6 "2018-03-07T19:54:33Z")

</div>

Yes, I completely agree - v0.7 looks great so far but it’s not production ready just yet (at least as much as a 0.x release can be production ready). Hopefully, it won’t be long.
