Is it possible to reinstall or recompile an already installed package in Julia? I did not find any hints in the official documentation. whos()
did not reveal anything useful either.
Best
As was pointed out in the answer below by @ivarne my question can also be understood as:
"How can I reload a package that has been loaded with import
or using
in a Julia session?"
This question has also been answered by @ivarne.
When you decide that you don't want to have a package around any more, you can use Pkg. rm() to remove the requirement for it from the REQUIRE file: julia> Pkg. rm("Distributions") INFO: Removing Distributions v0.
Julia uses git for organizing and controlling packages. By convention, all packages are stored in git repositories, with a ". jl" suffix. So the Calculus package is stored in a Git repository called Calculus.
Enter the Pkg REPL by pressing ] from the Julia REPL. To get back to the Julia REPL, press backspace or ^C.
You can re-run the package build script with Pkg.build("pkgname")
. The actual compiling of the packages is just in time so they are complied when you load them.
Not sure about the terminology you use, but if you think about reloading a package (with import or using), it is complicated and the best approach is to restart Julia.
A function called reload()
exists, but it has some limitations. While developing a Package, you might consider using something like the Autoreload.jl package to make it easier to reload the files you are working on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With