# IJulia problem?

**URL:** <https://discourse.julialang.org/t/ijulia-problem/109194>\
**Category:** General Usage\
**Created:** [January 24, 2024, 12:44pm UTC](https://discourse.julialang.org/t/ijulia-problem/109194 "2024-01-24T12:44:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronneesley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronneesley/32/11072_2.png) [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Post date:** [January 24, 2024, 12:44pm UTC](https://discourse.julialang.org/t/ijulia-problem/109194/1 "2024-01-24T12:44:46Z")

</div>

Hello,

I created a package called `GeometriaPlana` at my projects. In the iteractive terminal this `dev` project run perfectly, but at Jupyter via IJulia, this project throw an error.

```julia
ArgumentError: Package GeometriaPlana [d1eaa649-aac2-5819-91da-40fa014b2dd7] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
  [1] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1920
  [2] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
  [3] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
  [4] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
  [6] macro expansion
    @ Base ./loading.jl:1784 [inlined]
  [7] macro expansion
    @ Base ./lock.jl:267 [inlined]
  [8] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
  [9] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [10] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740

```

This problem happen when I do the command `using GeometriaPlana` at Julia version 1.10.0 **only via Jupyter Notebook**.

At the terminal, all works perfectly:

```julia
(@v1.10) pkg> status
Status `~/.julia/environments/v1.10/Project.toml`
  [d1eaa649] GeometriaPlana v0.0.9 `../../../git/julia/geometriaplana`
  [7073ff75] IJulia v1.24.2
  [ed5c6046] Matematica v0.1.4 `../../../git/julia/matematica`

(@v1.10) pkg> resolve
  No Changes to `~/.julia/environments/v1.10/Project.toml`
  No Changes to `~/.julia/environments/v1.10/Manifest.toml`

(@v1.10) pkg> build
    Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/51cab8e982c5b598eea9c8ceaced4b58d9dd37c9/build.log`
    Building IJulia → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/47ac8cc196b81001a711f4b2c12c97372338f00c/build.log`

julia> using GeometriaPlana

```

But the problem still persists at Jupyter Notebook.

Do someone knows this problem? I noticed this problem at others dev projects too, this is only a example.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 24, 2024, 1:23pm UTC](https://discourse.julialang.org/t/ijulia-problem/109194/2 "2024-01-24T13:23:29Z")

</div>

> [@Ronneesley](#):
>
> I created a package called `GeometriaPlana` at my projects. In the iteractive terminal this `dev` project run perfectly, but at Jupyter via IJulia, this project throw an error.
> 
> ```julia
> ArgumentError: Package GeometriaPlana [d1eaa649-aac2-5819-91da-40fa014b2dd7] is required but does not seem to be installed:
> - Run `Pkg.instantiate()` to install all recorded dependencies.
> 
> ```

Possibly you are running your notebook in a different environment. You can [install a different IJulia kernel](https://julialang.github.io/IJulia.jl/stable/manual/installation/#Installing-additional-Julia-kernels) with a ` --project=/some/path` argument to use a specified environment.

---

<div class="post-metadata">

**Author:** ![Ronneesley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronneesley/32/11072_2.png) [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Post date:** [January 24, 2024, 2:03pm UTC](https://discourse.julialang.org/t/ijulia-problem/109194/3 "2024-01-24T14:03:59Z")

</div>

Hi @stevengj ,

I installed IJulia only with:

```julia
(@v1.10) pkg> add IJulia
   Resolving package versions...
  No Changes to `~/.julia/environments/v1.10/Project.toml`
  No Changes to `~/.julia/environments/v1.10/Manifest.toml`

(@v1.10) pkg> build
    Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/51cab8e982c5b598eea9c8ceaced4b58d9dd37c9/build.log`
    Building IJulia → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/47ac8cc196b81001a711f4b2c12c97372338f00c/build.log`

```

And I runned Jupyter with:

```julia
$ jupyter notebook

```

So I think I’m running at default enviroment (not virtual env.).

Now, I noted that if I copy the notebook to another folder, the code runs, but why?

---

<div class="post-metadata">

**Author:** ![Ronneesley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronneesley/32/11072_2.png) [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Post date:** [January 24, 2024, 3:27pm UTC](https://discourse.julialang.org/t/ijulia-problem/109194/4 "2024-01-24T15:27:29Z")

</div>

Guys,

I discovered a new fact. Every time I change the dev code, the problem happen.

So, I tried to recompile the code via terminal, with the command:

```julia
(@v1.10) pkg> build
    Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/51cab8e982c5b598eea9c8ceaced4b58d9dd37c9/build.log`
    Building IJulia → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/47ac8cc196b81001a711f4b2c12c97372338f00c/build.log`
Precompiling project...
  1 dependency successfully precompiled in 2 seconds. 160 already precompiled.

```

And the code can be runned at Jupyter Notebook.

This Conda dependency, I don’t know why it’s here. Is IJulia creating a virtual env? What package has this dependency?

---

<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 24, 2024, 4:03pm UTC](https://discourse.julialang.org/t/ijulia-problem/109194/5 "2024-01-24T16:03:17Z")

</div>

`IJulia` will install its own miniconda version by default, see:

[https://julialang.github.io/IJulia.jl/stable/manual/installation/#Installing-IJulia](https://julialang.github.io/IJulia.jl/stable/manual/installation/#Installing-IJulia)

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 24, 2024, 8:54pm UTC](https://discourse.julialang.org/t/ijulia-problem/109194/6 "2024-01-24T20:54:40Z")

</div>

> [@Ronneesley](#):
>
> Now, I noted that if I copy the notebook to another folder, the code runs, but why?

As explained [in the IJulia manual](https://julialang.github.io/IJulia.jl/stable/manual/usage/#Julia-projects),

> The default Jupyter kernel that is installed by IJulia starts with the Julia command line flag `--project=@.`. A `Project.toml` (or `JuliaProject.toml`) in the folder of a notebook (or in a parent folder of this notebook) will therefore automatically become the active project for that notebook. Users that don’t want this behavior should install an additional IJulia kernel without that command line flag (see section [Installing additional Julia kernels](https://julialang.github.io/IJulia.jl/stable/manual/installation/#Installing-additional-Julia-kernels)).
