1

With this command line I can verify which packages are in use or loaded. List of loaded in Julia

filter((x) -> typeof(eval(x)) <:  Module && x ≠ :Main, names(Main,imported=true))

What command exists to unload one or more packages; Without having to start Julia again and load the packages that I want to continue using?

HerClau
  • 161
  • 2
  • 15
  • I don't think you can: what would happen to a piece of data of which the type is defined in a package that gets unloaded? (e.g. what would happen if you defined a dataframe, and then unloaded the DataFrames package) – François Févotte Sep 17 '20 at 07:31
  • Why do you want to unload packages? What are you actually trying to do? In other words, what's the problem with having packages that are loaded but which you don't actually use? Wouldn't you rather be interested in a way to "hide" names that were previously imported by an "using" or "import" statement? In that last case, `Revise` might be what you're looking for. – François Févotte Sep 17 '20 at 07:38
  • We have had this problem: ```cmn=testimage("cameraman");clr=colorview(RGB, rand(3, 10, 10)); imshow(cmn) WARNING: both ImageView and ImageInTerminal export "imshow"; uses of it in module Main must be qualified ERROR: UndefVarError: imshow not defined``` – HerClau Sep 17 '20 at 15:10
  • 1
    There are some ways to solve your problem. You could just use them as suggested (ImageView.imshow instead of only imshow, or ImageInTerminal.imshow instead) or you could only use the functions you are actually calling. Something like `using ImageView: imshow`. You cannot unload to get rid of the conflict. – aramirezreyes Sep 21 '20 at 15:32

0 Answers0