Is there another way to get this package to load?

enter image description here

  • 1
    $\begingroup$ Why do you believe you need to explicitly load the Image` context? It is automatically available when you start Mathematica. $\endgroup$
    – Edmund
    Sep 16 '16 at 17:18
  • 1
    $\begingroup$ Short answer, because that package isn't on $Path. $\endgroup$
    – Kuba
    Sep 16 '16 at 17:24

These is no such package.

Image` is a context, not a package.

I can see how this is confusing. When we use Get or Needs, we often use a notation which looks like a context. For example,

<< ErrorBarPlots`

However, this is not a context. It is a platform independent notation for file paths that Mathematica uses. Mathematica has special rules to resolve the location of the actual file. You can get it using


(* "/Applications/Mathematica 11.app/Contents/AddOns/Packages/ErrorBarPlots/Kernel/init.m" *)

When we do load the package, the package symbols will reside in the ErrorBarPlots` context.

(* "ErrorBarPlots`" *)

This is now a context.

It is a convention to use a package structure and file organization so that the special file path notation that we can use to load the package will be the same as the name of the package's main context.

But this is merely a convention, and nothing is forcing you to write your packages this way.

Image` is not a package, just a context containing internal symbols. It is always present, it doesn't need to be loaded. Perhaps what you really wanted was to add it to the $ContextPath.

  • 3
    $\begingroup$ Nothing is forcing but there is a message if Package` context was not created after calling << Package` . $\endgroup$
    – Kuba
    Sep 16 '16 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.