11
$\begingroup$

I am trying to use Mark Caprio's LevelScheme package for customizing graphics, but I haven't been able to get Mathematica to load the package using Get or Needs, which return the following errors:

Get::noopen: Cannot open C:\Users...\Mathematica\Applications\LevelScheme.>>

Needs::nocont: Context LevelScheme` was not created when Needs was evaluated. >>

The package is installed in $UserBaseDirectory under "Applications" alongside a number of other packages that are working fine (Win7, Mma 10.2). What is causing this problem?


Same issue observed with Mathematica 8:

... downloaded and unzipped package from the website, saved it in a folder and appended this folder to Mathematica's search path using:

AppendTo[$Path, "/Users/alessandromanzotti/Downloads/LevelScheme"]

{"/Applications/Mathematica.app/SystemFiles/Links",
"/Users/alessandromanzotti/Library/Mathematica/Kernel",
"/Users/alessandromanzotti/Library/Mathematica/Autoload", "/Users/alessandromanzotti/Library/Mathematica/Applications", "/Library/Mathematica/Kernel", "/Library/Mathematica/Autoload", "/Library/Mathematica/Applications", ".", "/Users/alessandromanzotti", "/Applications/Mathematica.app/AddOns/Packages",
...
"/Users/alessandromanzotti/Work/Software/Mathematica/LevelScheme", \ "/Users/alessandromanzotti/Downloads/LevelScheme"}

Everything seems OK

SetDirectory["/Users/alessandromanzotti/Downloads/LevelScheme"]; 
FileNames[] ‌

​{"BlockOptions", "ClipToRectangle"​, "CustomTicks", "doc"​, ".DS_Store",
"ForEach"​, "InheritOptions"​, "Kernel" ‌​, "LevelScheme" ‌​, "NamedColors"​}

But I get an error using Get["LevelScheme"]`.

$\endgroup$
3
  • $\begingroup$ Try putting it in your Program files->Wolfram Reasearch->Mathematica->8.0->AddOns->Packages...and restart Mathematica...in case it doesn't work remove it from there. $\endgroup$ Commented Jul 8, 2013 at 15:13
  • $\begingroup$ @Blackbird. OP is using OS X. Your suggestion won't work there; Mathematica file structure is different there. $\endgroup$
    – m_goldberg
    Commented Jul 8, 2013 at 16:23
  • $\begingroup$ @m_goldberg: ya I noticed later but I left the comment so that might be helpful to someone in future. Thanks for correcting me. $\endgroup$ Commented Jul 8, 2013 at 16:24

3 Answers 3

8
$\begingroup$

I faced this same problem. I tried all of the answers mentioned but none of them worked. Finally figured it out.This is what I did:

Firstly after you download the LevelScheme zip file extract it anywhere. In my case(Ubuntu) I extracted it at Desktop.So this is the folder contents after extraction:

enter image description here

Then you run this to find your Basedirectory

  FileNameJoin[{$UserBaseDirectory, "Applications"}]

I found mine to be in my home directory under .Mathematica/Applications

Then you simply cut all the folders from above and paste it into the Base directory just found. So in my case after pasting it was like this: enter image description here

Then you have to load them one by one in any order keeping LevelScheme last. So like I did this(You may get an error message here but that can be neglected):

Get["CustomTicks`"]
Get["BlockOptions`"]
Get["ClipToRectangle`"]
Get["CustomTicks`"]
Get["ForEach`"]
Get["InheritOptions`"]
Get["NamedColors`"]

And finally this

Get["LevelScheme`"]

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Yup, the zip package actually contains several packages. Btw, you don't have to load the other packages before LeveScheme, as they are loaded automatically by Get["LevelScheme"]`. $\endgroup$
    – Ajasja
    Commented Sep 2, 2013 at 16:00
  • 1
    $\begingroup$ This works but you need not to load all the packages manually, it is sufficient just to load Get["LevelScheme`"] $\endgroup$ Commented Sep 3, 2013 at 5:09
6
$\begingroup$

Let me make a guess: When you append "/Users/alessandromanzotti/Downloads/LevelScheme" to your $Path, then it is not possible to load LevelScheme` because no sub-directory contains a package named LevelScheme.

Please try the following: Copy the whole LevelScheme directory to

"/Users/alessandromanzotti/Library/Mathematica/Applications"

so that you have a LevelScheme subdirectory under Applications which contains all its content. Then the package loading should work.

$\endgroup$
2
  • 1
    $\begingroup$ I have a copy of the whole levelScheme folder in "/Users/alessandromanzotti/Library/Mathematica/Applications" but still, I can not get it... I get the error Get::noopen: Cannot open LevelScheme. if this can help. $\endgroup$ Commented Aug 15, 2013 at 22:01
  • 1
    $\begingroup$ @user1697991: I'm experiencing the same error. Needs["LevelScheme``", FileNameJoin[{$UserBaseDirectory, "Applications\\LevelScheme"}]] Just installed LevelScheme package in Applications directory ... everything should work, but Get and Needs both return "noopen : Cannot open C\:Users\ ...". This is on Win7, running 10.2 -- maybe it's a permissions issue? $\endgroup$
    – dionys
    Commented Jul 22, 2015 at 10:40
3
$\begingroup$

Appending to the $Path is not a good idea, because it doesn't change $Path permanently. You would have to evaluate the Append expression in new session where you planned to use the package. Best to move the package to a standard folder already on $Path. An appropriate folder would be found by evaluating

FileNameJoin[{$UserBaseDirectory, "Applications"}]
$\endgroup$
1
  • $\begingroup$ In my recent (2 minutes ago) case I had to add all the individual directories to \$Path first and then finally the top level LevelScheme directory itself. If the LevelScheme directory is before the LevelScheme/LevelScheme directory I run into infinite recursion when executing Get["LevelScheme`"]. With $Path in the correct order all seems well. Documentation is quite misleading here (writing docs is very dull I know ;). $\endgroup$
    – Ymareth
    Commented Feb 21, 2014 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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