Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTatiane Lima
6,738 PointsI tryied to install the Julia and i get an error
julia> ENV["JUPYTER"] = "/anaconda3/bin/jupyter" "/anaconda3/bin/jupyter"
julia> Pkg.add("IJulia") ERROR: UndefVarError: Pkg not defined Stacktrace: [1] top-level scope at none:0
This is my version of Julia: Version 1.1.0 (2019-01-21)
Thanks a lot
2 Answers
KRIS NIKOLAISEN
54,971 PointsThis is what I did:
In Julia press ] to enter package manager.
julia>]
You'll see the following prompt
(v1.1) pkg>
Enter:
add "IJulia"
Press delete to exit package manager
Tatiane Lima
6,738 PointsThanks Kris, it started to work but i get another error
(v1.1) pkg> add"Ijulia"
Cloning default registries into `~/.julia`
Cloning registry from "https://github.com/JuliaRegistries/General.git"
Added registry `General` to `~/.julia/registries/General`
ERROR: The following package names could not be resolved:
* Ijulia (not found in project, manifest or registry)
Please specify by known `name=uuid`.
i tried to find a solution in the internet and people said that i should run this code
rm(joinpath(homedir(), ".julia", "registries"); recursive=true)
That didn't work again, and i got this error message:
ERROR: could not determine command
Nicole Buckenwolf
8,721 PointsThank you I was getting this error, which I'm adding here in case anyone else gets it:
ERROR: UndefVarError: `Pkg` not defined
but your comment worked for me.
adrian miranda
13,561 PointsTo add a little clarification to this. The old way of installing julia add-ons (Pkg.add("IJulia")
) no longer works.
Nowadays, to add a new package, you would first hit ']'. That should cause you to get a new prompt that says pkg>
.
Next you can install it by saying:
add IJulia
I believe the most recent problem was because the user typed add "Ijulia"
instead of ```add "IJulia". The package names are case sensitive.
KRIS NIKOLAISEN
54,971 PointsKRIS NIKOLAISEN
54,971 PointsMay be case sensitive. It looks like you used lower case j