My question is quite elementary: Each time that I want to load an external package package.m I have to run:

$PackagePath = SetDirectory["/the/path"];

Could I somehow, set once and for all the $PackagePath so that, upon opening Mathematica I simply run <<package.m ` ?

  • 1
    $\begingroup$ You want to put that code in your initialization file, described here and here. $\endgroup$ – Jason B. Aug 14 '20 at 15:56

Your Answer

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

Browse other questions tagged or ask your own question.