# Newbie asking - How do I resolve the error: "ERROR: LoadError: ArgumentError: Package Base does not have Sobol in its dependencies"

**URL:** <https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 21, 2024, 2:07pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976 "2024-06-21T14:07:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![groblercarla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/groblercarla/32/210139_2.png) [@groblercarla](https://discourse.julialang.org/u/groblercarla)\
**Post date:** [June 21, 2024, 2:07pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/1 "2024-06-21T14:07:13Z")

</div>

I’m completely new to Julia, and have inherited a julia code project from another researcher. (Yay, Julia!)

I’m trying to resolve the environment, but I’m getting an error. Specifically the error says the following:

```julia
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have Base checked out for development and have
  added Sobol as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Base

```

Since I’m so new, I don’t want to report an issue with Base. However, I’ve followed all of the other suggested steps.

Could you help me figure out what I’m missing? Thanks in advance!

Here are my full steps:

```julia
julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.10.4 (2024-06-04)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.10) pkg> 

(@v1.10) pkg> activate .
  Activating project at `~/ACAI_testing/ACAI`

(ACAI) pkg> add Sobol
   Resolving package versions...
  No Changes to `~/ACAI_testing/ACAI/Project.toml`
  No Changes to `~/ACAI_testing/ACAI/Manifest.toml`

(ACAI) pkg> up
    Updating registry at `~/.julia/registries/General.toml`
  No Changes to `~/ACAI_testing/ACAI/Project.toml`
  No Changes to `~/ACAI_testing/ACAI/Manifest.toml`

(ACAI) pkg> resolve
  No Changes to `~/ACAI_testing/ACAI/Project.toml`
  No Changes to `~/ACAI_testing/ACAI/Manifest.toml`

(ACAI) pkg> status
Project ACAI v1.5.1
Status `~/ACAI_testing/ACAI/Project.toml`
  [336ed68f] CSV v0.10.14
  [a2e0e22d] CalculusWithJulia v0.2.6
  [8f4d0f93] Conda v1.10.0
  [a93c6f00] DataFrames v1.6.1
  [31c24e10] Distributions v0.25.109
  [fde71243] EasyFit v0.6.6
  [a98d9a8b] Interpolations v0.15.1
  [033835bb] JLD2 v0.4.48
  [23992714] MAT v0.10.7
  [85f8d34a] NCDatasets v0.14.4
  [438e738f] PyCall v1.96.4
  [d330b81b] PyPlot v2.11.2
  [1fd47b50] QuadGK v2.9.4
  [ed01d8cd] Sobol v1.5.0
  [fdbf4ff8] XLSX v0.10.1
  [ddb6d928] YAML v0.4.11
  [b77e0a4c] InteractiveUtils
  [37e2e46d] LinearAlgebra
  [d6f4376e] Markdown
  [9abbd945] Profile
  [9a3f8284] Random
  [2f01184e] SparseArrays v1.10.0
  [10745b16] Statistics v1.10.0

(ACAI) pkg> precompile
Precompiling project...
        Info Given ACAI was explicitly requested, output will be shown live 
ERROR: LoadError: ArgumentError: Package Base does not have Sobol in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have Base checked out for development and have
  added Sobol as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Base
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1776 [inlined]
 [2] macro expansion
   @ ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1753
 [4] #invoke_in_world#3
   @ ./essentials.jl:926 [inlined]
 [5] invoke_in_world
   @ ./essentials.jl:923 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1746
 [7] include
   @ ./Base.jl:495 [inlined]
 [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
   @ Base ./loading.jl:2222
 [9] top-level scope
   @ stdin:3
in expression starting at /home/carlau/ACAI_testing/ACAI/src/ACAI.jl:5
in expression starting at stdin:3
  ✗ ACAI
  0 dependencies successfully precompiled in 2 seconds. 182 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

ACAI [411ef148-9eb2-4e43-9147-35688f506280]

Failed to precompile ACAI [411ef148-9eb2-4e43-9147-35688f506280] to "/home/carlau/.julia/compiled/v1.10/ACAI/jl_ulyP58".
ERROR: LoadError: ArgumentError: Package Base does not have Sobol in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have Base checked out for development and have
  added Sobol as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Base
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1776 [inlined]
 [2] macro expansion
   @ ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1753
 [4] #invoke_in_world#3
   @ ./essentials.jl:926 [inlined]
 [5] invoke_in_world
   @ ./essentials.jl:923 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1746
 [7] include
   @ ./Base.jl:495 [inlined]
 [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
   @ Base ./loading.jl:2222
 [9] top-level scope
   @ stdin:3
in expression starting at /home/carlau/ACAI_testing/ACAI/src/ACAI.jl:5
in expression starting at stdin:

(ACAI) pkg> instantiate

(ACAI) pkg> 

```

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [June 21, 2024, 2:08pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/2 "2024-06-21T14:08:32Z")

</div>

What happens if you `resolve`? i.e.

```julia

(ACAI) pkg> resolve

```

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [June 21, 2024, 2:29pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/3 "2024-06-21T14:29:16Z")

</div>

> [@groblercarla](#):
>
> ```julia
> (ACAI) pkg> resolve
> No Changes to `~/ACAI_testing/ACAI/Project.toml`
> No Changes to `~/ACAI_testing/ACAI/Manifest.toml`
> 
> ```

Apparently nothing.

I tried `@eval Base using SomePackage` locally, but got an error about breaking incremental compilation, not the error you reported here.  
Have you modified the base Julia environment?

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [June 21, 2024, 2:41pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/4 "2024-06-21T14:41:31Z")

</div>

Looks (maybe) similar to [JuliaLang/julia#45832](https://github.com/JuliaLang/julia/issues/45832)?

Is all of the code inside `ACAI/src/ACAI.jl` inside of a module? Does `ACAI/src/ACAI.jl` begin with `module ACAI` and end with a matched `end` statement? Or is there code outside of a module?

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [June 21, 2024, 2:46pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/5 "2024-06-21T14:46:52Z")

</div>

> [@groblercarla](#):
>
> `in expression starting at /home/carlau/ACAI_testing/ACAI/src/ACAI.jl:5`

Can you post the full `ACAI/src/ACAI.jl` file? Or if not, can you post the first 5-10 lines or so?

---

<div class="post-metadata">

**Author:** ![groblercarla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/groblercarla/32/210139_2.png) [@groblercarla](https://discourse.julialang.org/u/groblercarla)\
**Post date:** [June 21, 2024, 4:50pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/6 "2024-06-21T16:50:57Z")

</div>

Hi all,

Thanks for the quick response, and your willingness to help!

Here are the contents of the ACAI.jl script:

````julia
"""
ACAI: Aviation Climate and Air quality Impacts
"""
#Add packages required by ACAI
using Sobol
using Random
using YAML
using Distributions
using JLD2 
using NCDatasets
using Interpolations
using LinearAlgebra
using Statistics
using PyCall
using Base.Filesystem

#Load functions and modules to run ACAI
include("src/simulation/simulations.jl")
include("src/distribution/distributions.jl")
include("src/emission/emissions.jl")
include("src/constants/constants.jl")
include("src/output/outputs.jl")
include("src/sensitivities/sensitivities.jl")
include("src/climate/climate.jl")
include("src/airquality/airquality.jl")
include("src/main/ACAIfunctions.jl")

function runACAI(input::String)
    if !isdir("output/")
        mkdir("output/")
    end
	#read user inputs, save information in simulation variable/struct
	simulation = getSimulationInfo(input);
    #run appropriate model (advanced or original)
    if simulation.approach == "advanced" 
        emission, climateoutput, aqoutput = runACAI_adv(simulation)
        return simulation, emission, climateoutput, aqoutput
    elseif simulation.approach == "original"
        if simulation.lc_analysis
            emission, mainoutput, lcoutput = runACAI_orig(simulation)
            return simulation, emission, mainoutput, lcoutput
        else
            emission, mainoutput = runACAI_orig(simulation)
            return simulation, emission, mainoutput
        end
    end
end```
````

---

<div class="post-metadata">

**Author:** ![groblercarla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/groblercarla/32/210139_2.png) [@groblercarla](https://discourse.julialang.org/u/groblercarla)\
**Post date:** [June 21, 2024, 4:52pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/7 "2024-06-21T16:52:31Z")

</div>

How do I know if I’ve modified the base environment?

I don’t think I have, but do you have a way for me to check that?

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [June 21, 2024, 6:18pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/8 "2024-06-21T18:18:41Z")

</div>

Hmmm, so to confirm, the text `module ACAI` does not currently appear anywhere in the `ACAI/src/ACAI.jl` file, right?

So, option 1 to try would be to add the following line at the very beginning of the `ACAI/src/ACAI.jl` file:

```julia
module ACAI

```

And also add the following line at the very end of the `ACAI/src/ACAI.jl` file:

```julia
end # module

```

* * *

Option 2 would be to leave the `ACAI/src/ACAI.jl` file unmodified, and instead modify the `Project.toml` file. Would it be possible for you to post the `Project.toml` file here?

---

<div class="post-metadata">

**Author:** ![groblercarla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/groblercarla/32/210139_2.png) [@groblercarla](https://discourse.julialang.org/u/groblercarla)\
**Post date:** [June 21, 2024, 6:43pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/9 "2024-06-21T18:43:52Z")

</div>

> [@dilumaluthge](#):
>
> Would it be possible for you to post the `Project.toml` file here?

Here’s the Project.toml file:

```julia
name = "ACAI"
uuid = "411ef148-9eb2-4e43-9147-35688f506280"
authors = ["joonheek "]
version = "1.5.1"

[compat]
julia = "1.10.4" # Compatible with Julia 1.6

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CalculusWithJulia = "a2e0e22d-7d4c-5312-9169-8b992201a882"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
EasyFit = "fde71243-0cda-4261-b7c7-4845bd106b21"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Sobol = "ed01d8cd-4d21-5b2a-85b4-cc3bdc58bad4"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

```

---

<div class="post-metadata">

**Author:** ![mihalybaci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mihalybaci/32/13528_2.png) [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Post date:** [June 21, 2024, 7:09pm UTC](https://discourse.julialang.org/t/newbie-asking-how-do-i-resolve-the-error-error-loaderror-argumenterror-package-base-does-not-have-sobol-in-its-dependencies/115976/10 "2024-06-21T19:09:43Z")

</div>

> [@dilumaluthge](#):
>
> So, option 1 to try would be to add the following line at the very beginning of the `ACAI/src/ACAI.jl` file:
> 
> ```julia
> module ACAI
> 
> ```
> 
> And also add the following line at the very end of the `ACAI/src/ACAI.jl` file:
> 
> ```julia
> end # module
> 
> ```

@dilumaluthge hit the nail on the head with this one I think. I was able to reproduce a similar error with that `Project.toml` file. But the error disappeared when I wrapped the script file in a `module .... end`

Try that option 1 and hopefully the issue goes away.
