Julia1.0 how to add the package?


#1
Julia1.0 how to add the package ?

#2

It’s not too clear what you’re asking. What have you tried already?


#3
when i add Plots, there was an error:

(v1.0) pkg> add Plots
ERROR: The following package names could not be resolved:
 * Plots (not found in project, manifest or registry)
Please specify by known `name=uuid`.

What should I do?

#4

Try

(v1.0) pkg> activate

(v1.0) pkg> add Plots
 Resolving package versions...

#5
I don't know why it's the same mistake:

(v1.0) pkg> add Plots
ERROR: The following package names could not be resolved:
 * Plots (not found in project, manifest or registry)
Please specify by known `name=uuid`.

#6

You probably don’t have the registry for some reason. Can you remove ~/.julia/registries and try again?


#7
I have successfully installed Plots, but when i using Plots, there was an error:

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
WARNING: could not import Base.linspace into Colors
ERROR: LoadError: LoadError: UndefVarError: endof not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at .\sysimg.jl:13
 [2] top-level scope at none:0
 [3] include at .\boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at .\loading.jl:1038
 [5] include at .\sysimg.jl:29 [inlined]
 [6] include(::String) at C:\Users\luk\.julia\packages\Plots\mqUvK\src\Plots.jl:3
 [7] top-level scope at none:0
 [8] include at .\boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at .\loading.jl:1038
 [10] include(::Module, ::String) at .\sysimg.jl:29
 [11] top-level scope at none:2
 [12] eval at .\boot.jl:319 [inlined]
 [13] eval(::Expr) at .\client.jl:389
 [14] top-level scope at .\none:3
in expression starting at C:\Users\luk\.julia\packages\Plots\mqUvK\src\types.jl:90
in expression starting at C:\Users\luk\.julia\packages\Plots\mqUvK\src\Plots.jl:156
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to C:\Users\luk\.julia\compiled\v1.0\Plots\ld3vC.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
 [4] _require(::Base.PkgId) at .\logging.jl:311
 [5] require(::Base.PkgId) at .\loading.jl:852
 [6] macro expansion at .\logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:834

 Is there any way you can solve this problem ?

#8

Looks like Plots.jl hasn’t been tagged for 0.7/1.0 yet.

A workaround seems to be to add the master branch instead:

(v1.0) pkg> add Plots#master


#9
(v1.0) pkg> add  https://github.com/JuliaPlots/Plots.jl#340cd0a1fe8bdddfb078e9fbd93d8cf4995cb134