How can I reinstall or recompile already installed packages in Julia?

StackOverflow https://stackoverflow.com/questions/23468381

  •  15-07-2023
  •  | 
  •  

문제

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