# Importing packages takes very long inside jupyter notebook

**URL:** https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306
**Category:** Performance
**Tags:** question, package, jupyter
**Created:** [May 4, 2023, 9:23am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306 "2023-05-04T09:23:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Optimization](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/optimization/32/32462_2.png) [@Optimization](https://discourse.julialang.org/u/Optimization)
#### Post date: [May 4, 2023, 9:23am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/1 "2023-05-04T09:23:14Z")

</div>

Hello,

Is there any particular resoan that importing packages in Jupyter notebook takes quite a long time. Every time it takes somewhere around 7 minutes while when not working with jupyter the import only takes a few second.

![image](https://global.discourse-cdn.com/julialang/original/3X/8/a/8ac66dbd09b81f591b555a91464373287962c6ca.png)

---

<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: [May 4, 2023, 9:32am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/2 "2023-05-04T09:32:15Z")

</div>

Do you observe this in “normal” Jupyter notebooks (with `IJulia`) or only in the VSCode extension notebooks?

---

<div class="post-metadata">

### Author: ![Optimization](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/optimization/32/32462_2.png) [@Optimization](https://discourse.julialang.org/u/Optimization)
#### Post date: [May 4, 2023, 9:56am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/3 "2023-05-04T09:56:38Z")

</div>

Hi @nilshg Yes, only with extension. I’ve never tried Ijulia for this problem of mine because I need to rerun some cells and Ijulia sometimes returns some error of “multiple definition…”.

---

<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: [May 4, 2023, 10:25am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/4 "2023-05-04T10:25:23Z")

</div>

Are you sure you aren’t consufing `IJulia` with `Pluto`? The `multiple definitions for...` error is a Pluto thing, which I haven’t seen in IJulia notebooks.

---

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [May 4, 2023, 11:24am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/5 "2023-05-04T11:24:14Z")

</div>

Unless it’s actually the redefinition of a constant?

---

<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: [May 4, 2023, 12:13pm UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/6 "2023-05-04T12:13:15Z")

</div>

But that should be `ERROR: invalid redefinition of constant` rather than `multiple definitions for`

---

<div class="post-metadata">

### Author: ![Optimization](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/optimization/32/32462_2.png) [@Optimization](https://discourse.julialang.org/u/Optimization)
#### Post date: [May 6, 2023, 8:40am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/7 "2023-05-06T08:40:25Z")

</div>

@nilshg yes, you’re right I’ve mixed those. Sorry. I’m inside Jupyter notebook extension of Vscode `IJulia` and importing takes considerable amont of time comparing to plain vscode .jl files.

---

<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: [May 6, 2023, 9:07am UTC](https://discourse.julialang.org/t/importing-packages-takes-very-long-inside-jupyter-notebook/98306/8 "2023-05-06T09:07:42Z")

</div>

And what about regular IJulia notebooks in the Browser? I’m not sure about the status of notebook support in the VSCode extension, when I last tried it a year ago or so it was definitely still a bit rough around the edges, partly because the upstream functionality in VSCode was also still pretty new and under development.
