Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding multiple packages at one time #134

Open
mkitti opened this issue Jul 3, 2024 · 0 comments
Open

Adding multiple packages at one time #134

mkitti opened this issue Jul 3, 2024 · 0 comments

Comments

@mkitti
Copy link
Member

mkitti commented Jul 3, 2024

If one tries to add a Vector{String} of packages, this fails due to the following MethodError:

julia> CondaPkg.add(["numpy", "scipy", "h5py", "matplotlib"])
ERROR: MethodError: no method matching add!(::Dict{String, Any}, ::String)

Closest candidates are:
  add!(::Any, ::CondaPkg.PipPkgSpec)
   @ CondaPkg ~/.julia/packages/CondaPkg/MmzxM/src/deps.jl:253
  add!(::Any, ::CondaPkg.ChannelSpec)
   @ CondaPkg ~/.julia/packages/CondaPkg/MmzxM/src/deps.jl:248
  add!(::Any, ::CondaPkg.PkgSpec)
   @ CondaPkg ~/.julia/packages/CondaPkg/MmzxM/src/deps.jl:228

Stacktrace:
 [1] add(pkgs::AbstractVector; resolve::Any, file::Any, kw...)
   @ CondaPkg ~/.julia/packages/CondaPkg/MmzxM/src/deps.jl:218
 [2] add(pkgs::AbstractVector)
   @ CondaPkg ~/.julia/packages/CondaPkg/MmzxM/src/deps.jl:215
 [3] top-level scope
   @ REPL[52]:1

We can get around this using the following command.

CondaPkg.add(CondaPkg.PkgSpec.(["numpy", "scipy", "h5py", "matplotlib"]))
@mkitti mkitti changed the title Add multiple packages at one time Adding multiple packages at one time Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant