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

Error when putting "using Plots" #1613

Closed
ayaka-usui opened this issue Jul 28, 2018 · 8 comments
Closed

Error when putting "using Plots" #1613

ayaka-usui opened this issue Jul 28, 2018 · 8 comments

Comments

@ayaka-usui
Copy link

I have a problem. I would like to plot, and I think that a simple way is to use a package "Plots". I have installed Plots by putting 'Pkg.add("Plots")'. Then, "using Plots; plot(x,y)" is supposed to work, I think. But a lot of errors came out. It would be great if you tell me what is going on.

julia> using Plots
INFO: Precompiling module Plots.
WARNING: --output requested, but no modules defined during run
WARNING: The call to compilecache failed to create a usable precompiledcache file for module Dates. Got:
WARNING: Cache file "/Users/usui/.julia/lib/v0.6/Dates.ji" not found.
WARNING: eval from module Main to Plots:
Expr(:call, Expr(:., :Base, :include_from_node1)::Any, "/Users/usui/.julia/v0.6/Dates/src/Dates.jl")::Any
  ** incremental compilation may be broken for this module **

WARNING: requiring "Dates" in module "Plots" did not define a corresponding module.
ERROR: LoadError: ArgumentError: Module Printf not found in current path.
Run `Pkg.add("Printf")` to install the Printf package.
Stacktrace:
 [1] _require(::Symbol) at ./loading.jl:435
 [2] require(::Symbol) at ./loading.jl:405
 [3] include_from_node1(::String) at ./loading.jl:576
 [4] include(::String) at ./sysimg.jl:14
 [5] anonymous at ./<missing>:2
while loading /Users/usui/.julia/v0.6/Plots/src/Plots.jl, in expressionstarting on line 9
ERROR: Failed to precompile Plots to /Users/usui/.julia/lib/v0.6/Plots.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405
 [4] macro expansion at /Users/usui/.julia/v0.6/Atom/src/repl.jl:118 [inlined]
 [5] anonymous at ./<missing>:?
@daschw
Copy link
Member

daschw commented Jul 28, 2018

What does Pkg.status("Plots") say?

@ayaka-usui
Copy link
Author

Thanks for the quick response! It says:

julia> Pkg.status("Plots")
 - Plots                         0.17.3+            master

@daschw
Copy link
Member

daschw commented Jul 28, 2018

Master is julia 0.7 only. 0.17.4 is the last version to support julia 0.6. You have to do Pkg.free("Plots") (and maybe Pkg.update()) in order to use Plots.

@ayaka-usui
Copy link
Author

I did Pkg.free("Plots") and Pkg.update(). In putting using Plots, there are still errors but they are different from those of before. But plot(x,y) works. Thanks! These are their results:

julia> Pkg.free("Plots")
INFO: Freeing Plots
INFO: No packages to install, update or remove

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: Cloning cache of FunctionalCollections from https://github.com/JuliaCollections/FunctionalCollections.jl.git
INFO: Cloning cache of JSExpr from https://github.com/JuliaGizmos/JSExpr.jl.git
INFO: Cloning cache of Observables from https://github.com/JuliaGizmos/Observables.jl.git
INFO: Cloning cache of WebIO from https://github.com/JuliaGizmos/WebIO.jl.git
INFO: Upgrading Blink: v0.6.2 => v0.7.0
INFO: Installing FunctionalCollectionsv0.3.2
INFO: Installing JSExpr v0.2.0
INFO: Installing Observables v0.1.2
INFO: Installing WebIO v0.2.4
INFO: Building HttpParser
INFO: Building MbedTLS
Info: using prebuilt binaries
INFO: Building WebIO
INFO: Building Blink

julia> using Plots
INFO: Precompiling module Plots.
WARNING: using Plots.savefig in moduleMain conflicts with an existing identifier.
WARNING: using Plots.quiver in module Main conflicts with an existing identifier.
WARNING: using Plots.twinx in module Main conflicts with an existing identifier.
WARNING: using Plots.hexbin in module Main conflicts with an existing identifier.
WARNING: using Plots.barh in module Main conflicts with an existing identifier.
WARNING: using Plots.bar in module Main conflicts with an existing identifier.
WARNING: using Plots.scatter in moduleMain conflicts with an existing identifier.
WARNING: using Plots.pie in module Main conflicts with an existing identifier.
WARNING: using Plots.arrow in module Main conflicts with an existing identifier.
WARNING: using Plots.text in module Main conflicts with an existing identifier.
WARNING: using Plots.contourf in module Main conflicts with an existing identifier.
WARNING: using Plots.spy in module Main conflicts with an existing identifier.
WARNING: using Plots.grid in module Main conflicts with an existing identifier.
WARNING: using Plots.plot in module Main conflicts with an existing identifier.
WARNING: using Plots.contour in moduleMain conflicts with an existing identifier.
WARNING: using Plots.boxplot in moduleMain conflicts with an existing identifier.

One more thing I want to ask is how to remove the errors after using Plot, though plot works. For you information, as you mentioned, the version of julia in mine is 0.6:

julia> VERSION
v"0.6.4"

@daschw
Copy link
Member

daschw commented Jul 28, 2018

Are these warnings still appearing if you restart julia and run using Plots?

@ayaka-usui
Copy link
Author

You are right! No error arose after julia restarted. Thanks a lot, daschw!

Press Enter to start Julia.
Starting Julia...
INFO: Loading HttpServer methods...
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.4 (2018-07-09 19:09 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-apple-darwin14.5.0

julia> using Plots

julia> plot(rand(100))

julia>

@daschw
Copy link
Member

daschw commented Jul 28, 2018

No, problem, I'm glad it works now!

@ABMSUH
Copy link

ABMSUH commented Mar 29, 2019

Hi,
I am facing big problem in Julia as follow:

“We tried to lunch Julia from:
C:\Users\Pechman\AppData\Local\Julia-1.1.0\bin\julia.exe
This path can be changed in the settings.
Details:
Access is denied.”

Please advise me to fix it…

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

3 participants