# Instantiate does not instantiate?

**URL:** <https://discourse.julialang.org/t/instantiate-does-not-instantiate/89309>\
**Category:** General Usage\
**Created:** [October 26, 2022, 4:38pm UTC](https://discourse.julialang.org/t/instantiate-does-not-instantiate/89309 "2022-10-26T16:38:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 26, 2022, 4:38pm UTC](https://discourse.julialang.org/t/instantiate-does-not-instantiate/89309/1 "2022-10-26T16:38:01Z")

</div>

I’m playing with some student code, and the following is happening: while there is a `Manifest.toml` file and it seems to contain all the packages, `instantiate` does nothing:

```julia
shell> ls
 config.jl 'ddt_polipart!.jl' geradist.jl Manifest.toml Project.toml Run_polipart.jl Solve_BV2.jl
 Configsimul.jl 'ddt_regsol_4!.jl' jacpattern.jl Mataux.jl projeto_1D Salvasimul.jl 'Solve_BV!.jl'

shell> grep DifferentialEquations Manifest.toml
[[deps.DifferentialEquations]]

(projeto_1D) pkg> instantiate

julia> using DifferentialEquations
 │ Package DifferentialEquations not found, but a package named DifferentialEquations is available from a registry. 
 │ Install package?
 │ (projeto_1D) pkg> add DifferentialEquations 
 └ (y/n/o) [y]: n
ERROR: ArgumentError: Package DifferentialEquations not found in current path.
- Run `import Pkg; Pkg.add("DifferentialEquations")` to install the DifferentialEquations package.

```

What may be happening here?

The `Project.toml` file seems fine as well.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [October 26, 2022, 5:37pm UTC](https://discourse.julialang.org/t/instantiate-does-not-instantiate/89309/2 "2022-10-26T17:37:37Z")

</div>

Is `DifferentialEquations` listed as a direct dependency in `Project.toml`? That error has nothing to do with `Manifest.toml` or instantiation.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 26, 2022, 5:45pm UTC](https://discourse.julialang.org/t/instantiate-does-not-instantiate/89309/3 "2022-10-26T17:45:38Z")

</div>

The code is not mine, so I will answer you in a private message to add further info. But for that specific question the answer is yes, it is listed.

I think the problem is somehow related to uppercase, lowercase, or underscore characters, as the code came from a Windows machine. I have reorganized the directory structure and now it is working, but there may be an underlying issue there.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 26, 2022, 5:52pm UTC](https://discourse.julialang.org/t/instantiate-does-not-instantiate/89309/4 "2022-10-26T17:52:16Z")

</div>

Oh, no, I see what was going on. The script of the student started with

```julia
import Pkg; Pkg.activate("ProjectName")

```

but when coding from `VSCode`, `ProjectName` was already active, such that that first line of the script created a subproject, and that messed up everything when it came to executing stuff.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [October 26, 2022, 5:56pm UTC](https://discourse.julialang.org/t/instantiate-does-not-instantiate/89309/5 "2022-10-26T17:56:29Z")

</div>

If the intention is to activate the project in the same directory as the script, I’d strongly recommend doing `Pkg.activate(@ __DIR__ )`.
