Message Boards Message Boards

0
|
11305 Views
|
10 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Can not read a package name_package.m in my laptop using Mathematica 9.

Posted 10 years ago

Hello Dear Community:

I want to ask something about a problem with Mathematica 9. My Wolfram Mathematica 9, can not read some package, like name_package.m. I'm working inside where I can find name_package.m . Now, some one can tell me what is the problem about this.

Really, I changed again the Mathematica version, and I can not solve this problem. In another PC and laptop I run this package very well. But, I can not find the answer for my problem in my laptop (a Ultrabook ASUS) I appreciate your time and any comment.

Regards,

PA

POSTED BY: pedro allendes
10 Replies

I wish that I could help more. I hope this gets resolved.

POSTED BY: David Reiss
Posted 10 years ago

Thank you Mr. D. Reiss, You are very kindly for your time and atenttion! I will tray to contact directly then. Regards.

POSTED BY: pedro allendes

Unfortunately these are details that I do not have suggestions for. I would suggest that you contact Wolfram Customer Support (unless someone here has additional suggestions for help):

http://www.wolfram.com/support/contact/

POSTED BY: David Reiss
Posted 10 years ago

Thank you so much for your comment. I wrote this contribute something interesting how my new line of command: AppendTo[$Path, "/home/.../The_Program"] Now I'm running Mathematica 10.0.1 and using " Ubuntu 12.04.4 LTS " OS. My problem persist. my NamePackage.m don't run. But, in other PC is running this package, using Mathematica 9 or 10. Really I don't know what it is the origin of the problem. I was thinking about the installation of Mathematica was wrong..may be (a bad instalation for example). Then, I take off the different archive from Mathematica: given by: /usr/local/Wolfram/Mathematica/ ; ~/.Mathematica/ ; /usr/share/Mathematica/ ; /usr/local/Wolfram/ (/usr/local/Wolfram/Mathematica/) ; and the archive that found in /usr/local/bin/ It's name are: math mathematica Mathematica MathematicaScript MathKernel mcc wolfram WolframKernel WolframScript .- But, now I'm running "Mathematica" where I have my NamePackage.m and this package don't is up!, Mathematica don't show the letter that should be appear, If it's running ok. I don't know what it is the problem in my machine(may be) or in some tool that Mathematica loss(why not?). Other situation that I did, is, I open my package using Mathematica, but when put Run Package in ON, don't run again! again, I select all and run(using Ctrl+A and then Shift+Enter) and the package is "running" with many errors that don't should show, because I run in OTHER PC that read very well which showed nathing error. Now I feel uneasy for my problem..and I can not find the final and correct answer to my problem. Please I appreciate your time and atention, But what do you think about this?? Regards, PA

POSTED BY: pedro allendes

Thanks Bruce! I forgot about that.

POSTED BY: David Reiss

fyi, The Community editor interprets underscore characters and dollar sign characters as formatting commands if they are not escaped with a backslash (\) or in backquotes (``). I patched your posts; I hope they get across your meanings better now.

POSTED BY: Bruce Miller

When Mathematica tries to load a package with either Get (which you are using with the shorthand <<) or Needs Mathematica first looks for the packages in the correent working directory (which in your first example you have set to the directory where your package is located) and if the package is not there then it looks in the directories that it knows about. These directories are the ones contained in the $Path parameter.

So if your package's directory is not contained amongst the directories in $Path then Mathematica will not find it. You can add that directory to the $Path parameter for the current Mathematica session using

AppendTo[$Path, directory]

where directory is the full path to the directory where your package is located.

POSTED BY: David Reiss
Posted 10 years ago

Thank you for your comments Mr. D. Reiss. The form that I'm reading the special package is using the next sentence:

<<NamePackage.m 

My NamePackage.m is located in a folder, it's name is "The_Program". If my Mathematica can not read NamePackage.m like I explained before, I change the "Directory" and I force that Wolfram is working in "The_Program" folder. Now, run the package again, but, I have a problem again, can not read the package correctly!. I appreciate your time and attention.

POSTED BY: pedro allendes

A couple of quick comments or suggestions.

The first is, depending upon how you are trying to load your package, you should determine whether Mathematica knows where to look for your package. How are you trying to load it and where is that package located on your system?

Second suggestion is that you do not use _ characters in the name of your package. This potential he can cause problems in your code because the _ character has a meaning in Mathematica to indicate a pattern. Problems might not happen, but it is best to avoid their potentiality.

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract