Is package from dependencies avialable for using

Could you please help me to understand the Packages dependencies using. For example, I installed the GLMakie package:

Updating `C:\Users\aleck\.julia\environments\v1.5\Project.toml`
  [e9467ef8] + GLMakie v0.1.23
Updating `C:\Users\aleck\.julia\environments\v1.5\Manifest.toml`
  ...
  [5789e2e9] + FileIO v1.4.5
  ...

I suppose that the FileIO packages was installed as a dependency for GLMakie. However I cannot use this package

using FileIO

julia> using FileIO
ERROR: ArgumentError: Package FileIO not found in current path:
- Run `import Pkg; Pkg.add("FileIO")` to install the FileIO package.

I can install FileIO. But will it be duplication of the FileIO from GLMakie?

Just ] add FileIO. It won’t be a duplicate. Every environment contains precisely one version of a package. Irrespective of whether it was installed explicitly or as a dependency.

(You can also try using GLMakie.FileIO.)

3 Likes

So, after I install

using Pkg
Pkg.add("FileIO")

I will have in my environment only one package FileIO but with two different names FileIO and GlMakie.FileIO?

Yes. But if GLMakie.FileIO works you could also perhaps just define an alias FileIO. Anyways, I would go with the explicit add.

1 Like