CondaPkg.jl icon indicating copy to clipboard operation
CondaPkg.jl copied to clipboard

Not able to specify “extras” in `pip_add` ?

Open x-EricH-x opened this issue 2 years ago • 1 comments

sometimes it is necessary to specify the [extras] when doing pip install, but is seems pip_add does not support it

right now it gives this error: (command conda pip_add polars[numpy])

(my-julia-proj) pkg> conda pip_add polars[numpy]
ERROR: invalid pip package: polars[numpy]
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] parse_pip_pkg(x::String; binary::String)
    @ CondaPkg.PkgREPL ~/.julia/packages/CondaPkg/osUdN/src/PkgREPL.jl:33
  [3] (::CondaPkg.PkgREPL.var"#4#5"{String})(arg::String)
    @ CondaPkg.PkgREPL ./none:0
  [4] iterate
    @ ./generator.jl:47 [inlined]
  [5] collect(itr::Base.Generator{Vector{String}, CondaPkg.PkgREPL.var"#4#5"{String}})
    @ Base ./array.jl:782
  [6] pip_add(args::Vector{String}; binary::String)
    @ CondaPkg.PkgREPL ~/.julia/packages/CondaPkg/osUdN/src/PkgREPL.jl:187
  [7] pip_add(args::Vector{String})
    @ CondaPkg.PkgREPL ~/.julia/packages/CondaPkg/osUdN/src/PkgREPL.jl:186
  [8] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode ~/julia-1.9.2/share/julia/stdlib/v1.9/Pkg/src/REPLMode/REPLMode.jl:412
  [9] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode ~/julia-1.9.2/share/julia/stdlib/v1.9/Pkg/src/REPLMode/REPLMode.jl:390
 [10] do_cmd
    @ ~/julia-1.9.2/share/julia/stdlib/v1.9/Pkg/src/REPLMode/REPLMode.jl:380 [inlined]
 [11] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode ~/julia-1.9.2/share/julia/stdlib/v1.9/Pkg/src/REPLMode/REPLMode.jl:557
 [12] #invokelatest#2
    @ ./essentials.jl:816 [inlined]
 [13] invokelatest
    @ ./essentials.jl:813 [inlined]
 [14] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/julia-1.9.2/share/julia/stdlib/v1.9/REPL/src/LineEdit.jl:2647
 [15] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/julia-1.9.2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1300
 [16] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:514

x-EricH-x avatar Aug 04 '23 21:08 x-EricH-x

Indeed it's not currently supported - but would be fairly easy to add.

cjdoris avatar Aug 05 '23 19:08 cjdoris

Just ran into this, would be helpful to add!

aidanlsb avatar Nov 02 '24 22:11 aidanlsb

I just added this today - a release is coming out now.

cjdoris avatar Nov 08 '24 22:11 cjdoris