8
$\begingroup$

I recently used Mathematica's IntegerName function, but upon calling it for the first time, I was surprised to be greeted by a message reading:

"Installing data from wolfram research server.."

accompanied by a progress bar of whatever it was downloading. After it finished, it worked fine, but this was an unexpected result.

Suppose I would like to use this IntegerName function on another computer without network access. How would I install it? Can you list the steps I need to take? Thanks.

$\endgroup$
4
  • $\begingroup$ How was Mathematica installed and activated on the other computer without network access? $\endgroup$
    – Somos
    Commented Jan 8, 2019 at 2:06
  • 3
    $\begingroup$ @Somos You don't need network access to do either (USB drive + manual activation), it's just easiest. I could also imagine a case where a laptop might not always have a network connection after installation. @jippyjoe4 I tried running IntegerName without internet and it ran. It might be that it simply checks for updates sometimes but doesn't require internet? I'm not sure, but I'll be interested to see what the answer is. $\endgroup$
    – MassDefect
    Commented Jan 8, 2019 at 4:49
  • $\begingroup$ @MassDefect, do you happen to know if there's a paclet or something that contains certain functions that can be installed manually? I'm not really sure how this works and haven't made any progress yet. $\endgroup$ Commented Jan 11, 2019 at 22:57
  • $\begingroup$ @jippyjoe4 Sorry, I'm not sure. I was also hoping someone might have an answer to this. My best guess is that most of these functions will work just fine without an internet connection and that they simply download updates and bug fixes for certain functions. My recommendation would be to try running the function on the computer that has no internet access. Does it give you an error or does it run okay? $\endgroup$
    – MassDefect
    Commented Jan 11, 2019 at 23:38

1 Answer 1

14
$\begingroup$

IntegerName depends on CountryData:

IntegerName[2, {"Dutch", Entity["Country", "Netherlands"]}]

because it needs to return the name of the integer for any language:

enter image description here

This means that when you use IntegerName for the very first time it will download and install the "CountryData" paclet. Every subsequent use of IntegerName will not need to download this paclet again, because it is cached on your machine.

If you run this code, you should see all the paclet you have installed on your machine:

SystemOpen[FileNameJoin[{$UserBasePacletsDirectory, "Repository"}]]

and a directory like CountryData-10.0.86 should be present. You should never need to delete any paclets, but if you feel the need to you can run a command like this to uninstall an individual paclet:

PacletUninstall["CountryData"]

Never delete the directory directly from your system because there is also an index file and things may get out of sync. If you want to completely blow away all your paclets you can remove the $UserBasePacletsDirectory directory altogether.

The paclet system hosts over 2,000 paclets, many of which are very very large paclet files (over 100MB) and this is the reason we don't include them in the product (the download size would be many times larger than the current 4GB size). You can get the exact number with this command:

PacletFindRemote["*"] // Length (* gives 2232 for me *)

A good example for an upcoming version is the paclet for the GPU machine learning (training) libraries which is about 990MB. A fair number of users won't need this, so we don't include it with the core product. Another example is the resources paclet for CUDALink which is also several 100MB large.

If you need to install this paclet on an off-line machine, you can download it first on an on-line machine, e.g.:

URLDownload[
 "http://pacletserver.wolfram.com/Paclets/CountryData-10.0.86.paclet", 
 "C:\\Users\\arnoudb.WRI\\Downloads\\CountryData-10.0.86.paclet"
]

And then copy it to a USB stick and then install it from the USB stick with the off-line machine, e.g. say "G:" is the USB drive:

PacletInstall["G:\\CountryData-10.0.86.paclet"]

(On Mac the instructions are similar, but with other path names of course)

$\endgroup$
2
  • 3
    $\begingroup$ I would expect the simple, commonly used one-argument form (e.g. IntegerName[100]) does not need anything from CountryData... but it still performs the download. It would be a little nicer to delay that until actually required. $\endgroup$
    – ilian
    Commented Jan 20, 2019 at 4:21
  • $\begingroup$ Hi, I would like to install the MXNetResources paclet offline. However, I do not have access to pacletserver.wolfram.com/Paclets to find this paclet. Is there any solution? Thank! $\endgroup$ Commented Jul 8, 2020 at 16:15

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.