News:

alphaMELTS 1.9 is available at the download and information site.
alphaMELTS 2 standalone & for MATLAB/Python are available on request
(see the Version 2 tab on the download site for more details).
For news of all MELTS software see the MELTS Facebook page.

Main Menu

[FAQ] Installing Perl and setting the PATH

Started by Paula, June 25, 2012, 03:53:27 PM

Previous topic - Next topic

Paula

To install Perl:

Installing Perl is only required if you do not have MATLABTM installed. First check that Perl is not already installed by opening the Command Prompt (cmd.exe) and typing 'perl -v'. If you get a message like "'perl' is not recognized as an internal or external command, operable program or batch file", then either:
  • Download the portable version of Strawberry Perl. Double-click the archive to extract the files and, optionally, move the folder to a more convenient location on your hard disk.
               ... or ...
  • Download the MSI installer for ActivePerl or for Strawberry Perl. As a user with admin privileges double-click the installer and follow any instructions.
Do not try to install a newer version of Perl, e.g. 5.14, over an older one, such as 5.12 (e.g. see here). alphaMELTS should work fine with any version of Perl from 5.6 onwards.

WARNING: if you have ActivePerl or the not 'portable' version of Strawberry Perl installed then you should use this perl.exe to open the alphaMELTS installation script (and not the perl.exe inside MATLAB or the one in the portable version of Strawberry Perl). See the documentation for more information on locating the perl.exe you need to use the first time you open install.command:

QuoteThe Strawberry Perl executable will usually be at 'strawberry_perl_folder\perl\bin\perl.exe'; the Matlab version will be something like 'C:\Program Files\Matlab\Rrelease\sys\perl\win32\bin\perl.exe', where release is the year followed by 'a' or 'b'; and the ActivePerl one should be at 'activeperl_folder\bin\perl.exe'. Note that if a Perl program has been installed on the Windows machine previously (e.g. to use Adiabat_1ph 2) then that version should be used. If you wish to use the perl.exe included in Matlab or the 'portable' version of Strawberry Perl instead, then you need to uninstall the other Perl program first to avoid conflicts. Note also that the 'Open with…' association need only be set up once (for each user). This step can be omitted when installing subsequent releases of the alphaMELTS package.

If required, install.command will do some configuration to make sure that command line switches, such as '-f settings_file', are recognised by Perl (see this post). It will then associate the '.command' file extension with your chosen 'perl.exe'. Then if you double-click a '.command' script or type its name at the command line then Perl will open automatically. Except for the very first time you open install.command you do not need to load the Perl program manually.

To check the path after running install.command:

Once you have logged out and in, if prompted to do so, then:
  • Double click install.command and the PATH variable will displayed at the top. Close the window with the 'x'.
               ... or ...
  • Double click install.command. Type 1. 'enter', 2. 'links_folder', 3. 'enter', 4. 'n', 5. 'enter' to test whether links_folder specifically is in your path and then abort another installation.
               ... or ...
  • At the Command Prompt type 'echo %PATH'.
To edit the path, for example if you change the location of the links_folder to new_folder:

WARNING: if you do not understand what the Path variable does then please do not try to edit it!!! This is especially important on Windows as it's harder to undo any changes. You can always use alphaMELTS in double-click / drag-and-drop mode on Windows even if the links_folder is not in your Path.

First open the Control Panel. Either:
  • Find the 'Control Panel' under 'Windows System' on the Apps screen on Windows 8
               ... or ...
  • Find the Control Panel in the Start Menu on Windows 7 or XP.
Then go to:
  • 'User Accounts and Family Safety -> User Accounts -> Change my environment variables' on Windows 7 or 8
               ... or ...
  • '(Performance and Maintenance ->) System->Advanced -> Environment Variables' on Windows XP.
Edit the User variable (U) 'Path' value and add ';new_folder' at the end of the existing data. Do not miss out the ';' if there are any existing values in the Path. Also be wary that values tend to get highlighted / selected automatically in Windows. Make sure to click in the box and move the cursor to the end before typing, else you might accidentally overwrite other Path entries.

Note, please only edit the path if prompted to do so by install.command or if you change the links_folder location after installation. Do not edit the System variable (S) that is called 'Path'. If there is no User variable called 'Path' then please try running install.command (again). It should create the 'Path' variable if it does not already exist.

There are plenty of websites and videos that will explain in more detail about the Path, and how to set it, and about file associations etc..  Googling "set path windows" and "file associations windows" will bring up several links that deal with each of XP, 7 and 8 and this beginners guide to the command prompt may also be useful for getting started with alphaMELTS.

Hope that helps,
Paula


Paula

#1
If you have a non-English version of Windows installed then the Microsoft Language Portal will be useful for accurately translating the instructions e.g. for setting the path. Select the 'Terminology Search' tab and, optionally, choose 'Windows' from the 'Product' drop down menu. For example, 'User Accounts and Family Safety -> User Accounts -> Change my environment variables' could become:
  • 用户帐户和家庭安全 -> 用户帐户 -> 更改我的环境变量
  • 使用者帳戶和家庭安全 -> 使用者帳戶 -> 變更我的環境變數
  • Comptes d'utilisateurs et protection des utilisateurs -> Comptes d'utilisateurs -> Modifier vos variables d'environnement
  • Benutzerkonten und Jugendschutz -> Benutzerkonten -> Eigene Umgebungsvariablen ändern
  • Account utente e protezione per la famiglia -> Account utente -> Modifica variabili di ambiente
  • ユーザー アカウントと家族のための安全設定 -> ユーザー アカウント -> 環境変数の変更
  • 사용자 계정 및 가족 보호 -> 사용자 계정 -> 환경 변수 변경
  • Contas de Usuário e Segurança Familiar -> Contas de Usuário -> Alterar as variáveis do meu ambiente
  • Учетные записи пользователей и семейная безопасность -> Учетные записи пользователей -> Изменение переменных среды
  • Cuentas de usuario y protección infantil -> Cuentas de usuario -> Cambiar las variables de entorno
If there are errors in these translations (i.e. they don't actually correspond to what's in the Control Panel on Windows) then please let us know. Likewise, if you translate the instructions into another localization and want to save other users the trouble then post the results as a reply below. Thanks!

The Portal can also be useful if the alphamelts executable (or other software) crashes and you want an English translation of the error message so that you can search the appropriate forum or post a bug report. Select the 'Error Messages' tab, then choose your language under 'In' or, for the languages listed above, you can use the 'Change Language' drop down menu to the right. For alphamelts.exe errors, set the 'Product' to 'Visual Studio'.

Paula