hi there,
I’m using a command line to install packages. I have a problem when I want to fix the version.
In the doc:
https://pkgdocs.julialang.org/v1/managing-packages/
It is said that I can use @version
, #branchname
(or #commitSHA1
)
pkg> add Example@0.4
pkg> add Example#master
This command works fine for me
julia --project=/opt/julia/share/julia/environments/v1.6 -e 'ENV["PYTHON"]="/opt/jupyterhub/bin/python"; empty!(DEPOT_PATH); push!(DEPOT_PATH,"/opt/julia/share/julia"); using Pkg; Pkg.add("PyPlot"); Pkg.precompile()'
julia --project=/opt/julia/share/julia/environments/v1.6 -e 'using Pkg; Pkg.status("PyPlot")'
Status `/opt/julia/share/julia/environments/v1.6/Project.toml`
[d330b81b] PyPlot v2.9.0
julia --project=/opt/julia/share/julia/environments/v1.6 -e 'using Pkg; Pkg.rm("PyPlot")'
But adding version it does not work:
julia --project=/opt/julia/share/julia/environments/v1.6 -e 'ENV["PYTHON"]="/opt/jupyterhub/bin/python"; empty!(DEPOT_PATH); push!(DEPOT_PATH,"/opt/julia/share/julia"); using Pkg; Pkg.add("PyPlot@2.9.0"); Pkg.precompile()'
ERROR: `PyPlot@2.9.0` is not a valid package name
julia --project=/opt/julia/share/julia/environments/v1.6 -e 'ENV["PYTHON"]="/opt/jupyterhub/bin/python"; empty!(DEPOT_PATH); push!(DEPOT_PATH,"/opt/julia/share/julia"); using Pkg; Pkg.add("PyPlot#d330b81b"); Pkg.precompile()'
ERROR: `PyPlot#d330b81b` is not a valid package name
Can somebody help me on this?
julia --version
julia version 1.6.0