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.

有帮助吗?

解决方案

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 are developing package and heve it installed using dev command, than Base.compilecache(Base.PkgId(PDFIO)) does the job.
In this case PDFIO is the package that I'm working on. It is more convenient than restarting julia.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top