1

I want to install the yaml (and any other including iracket ..) package to my local Racket directory (portable on a stick) -

Package installation using DrRacket or raco uses C:\Users\name\AppData\Roaming

so my stick does not work on other machines. Any clue?

[EDIT] I do have some questions - my aim is primarily to set up a portable Racket environment, to realice some smaller applications and have windows 7 or 10 and no rights because of safety. 1) in Dr. Racket i didnt found to set the human-language permanently to english (very annoying). 2) This Settings are made in the c:/users/name/appdata/roaming/Racket - so not on my usb stick. To set the PLTUSERHOME (which was one try) - I couldn figure out how and where to use this settings. So this may be the wrong solution? 3) Another feature I would appreciate would be a "single click" to start the jupyter notebook (include newest python release) using the racket curnel. (All of these may be of interrest of also other users - so why not impement this settings to DrRacket in general or is this just a silly idea?) I want to install the yaml (and any other including iracket ..) package to my local Racket dicectory (portable on a stick) - so my stick does not work on other machines. Any clue?

John Clements
  • 16,895
  • 3
  • 37
  • 52
Erich
  • 41
  • 7

1 Answers1

3

It sounds to me like you have DrRacket installed on the USB drive, and you want the installed packages to wind up there, too. The solution here is to make your package installations "installation scope" rather than "user scope".

If you're installing, say, sxml from the command line, that would be

raco pkg install --scope installation sxml

If you're installing using the Package Manager within DrRacket, click on the "Details" link in the "do what I mean" tab to show the "scope" dropdown.

John Clements
  • 16,895
  • 3
  • 37
  • 52
  • Yes, you are right - because of safety restrictions its not allowed to install any stuff - therefore I used the usb stick. – Erich Jan 16 '19 at 19:56
  • Yes, you are right - because of safety restrictions its not allowed to install any stuff - therefore I used the usb stick. using DrRacket: I did not found any settings to modify according your raco command, but using command line and raco that works for yaml. Installing iracket (python is also on the usb stick) that fails completely also the racket-prefs.rktd and other settings (human-language ..) are not on the stick. It seems that DrRacket is not suited for portable use. – Erich Jan 16 '19 at 20:04
  • @Erich I think you can make Racket put its settings data on the USB stick by creating a new directory there and setting the `PLTUSERHOME` environment variable to that directory before running racket, drracket, raco, etc. See the docs for `find-system-path` with `'home-dir` and `'pref-dir` here: http://docs.racket-lang.org/reference/Filesystem.html – Ryan Culpepper Jan 16 '19 at 22:09
  • @Ryan - thanks for your contibution, but I could not ind any hint how and where to put this variable in DrRacket or elsewhere. There are no file for presets neither a menu setting. Could you please explain how this works? – Erich Jan 18 '19 at 18:25
  • The standard way to set environment variables on a Unix-y platform is using a shell script. However, if you're double-clicking to start an application, that probably won't work. I don't have a Windows machine in front of me, but I have a vague recollection that when you create a shortcut in Windows, you can edit it to set the values of environment variables before the application starts. – John Clements Jan 23 '19 at 19:31
  • Actually, it may be easier than I suggested. See this answer: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them – John Clements Jan 23 '19 at 19:36