===== Installation for Mac ===== ====1a. Anaconda==== The OSX distribution of //Anconda// is offered as one installation package. All insallation options pre-selected by default can be accepted throughout. After the installation is complete, //Anaconda// can be set up directly in the terminal. To verify that //Anaconda// is installed correctly and is up to date use the command: conda --version and conda update conda. These commands must show the version of //Anaconda// and list the modules that may be available for the update; you will be asked if you want to install the updates. For our purposes, update is not required, so "n" (for update: "y") is sufficient.: {{:wiki:conda_osx_prompt.png?600|}} ====1b. Miniconda (alternative to Anaconda)==== //Miniconda// is offered for OSX in two versions - as bash-script or as pkg-install. The bash-script can be executed accordingly in Terminal with "bash". It is recommended to answer the prompt "Do you wish the installer to initialize Anaconda3 by running conda init?" with "Yes". This will integrate the conda input into the terminal (this is done automatically with the pkg version). shasum -a 256 /path/filename. Replace **/path/filename** with your installation path and filename. {{ :shasum_mac_installation.png?nolink&600 |}} To install the command line, the appropriate command is needed: bash ~/Downloads/Anaconda3-2020.02-MacOSX-x86_64.sh The command **bash ~ /** must also be supplemented with the path of the downloaded command line file. The path is retrieved with the secondary click; this opens a menu where you copy the files. With the menu open, hold down the Option (⌥) key. {{ :bash_mac_installation.png?nolink&600 |}} To find the path of the **miniconda3** folder, go to **Spotlight Search**, then use the same procedure to copy the path (secondary click + Option / Alt key (⌥) + Copy). {{ :copy_path_mac_installation.png?nolink&600 |}} To enable terminal integration outside of bash script, you must enter the following (the conda path must be customized accordingly): source *path to conda*/bin/activate. {{ :source_mac_installation.png?nolink |}} And then: conda init zsh or conda init. This will seamlessly integrate the Conda input into the terminal and you can proceed with setting up the project-specific Python environment! ====2. Project-specific Python environment==== Next, you need to install the additional modules required for the analysis project using a yml script. For this purpose, a special yml file must be attached:\. First load the current file [[https://analyse.hfm-weimar.de/scripts/hfm_1.1.2.yml|hfm_x.x.x.yml]] on your local computer (right click -> save target as). In the following, please replace the name 'hfm_x.x.x.yml' with the name of the current version you downloaded, e.g. 'hfm_1.1.2.yml'. For Mac computers, unfortunately, the downloadable files are saved in .txt format. You need to change these files manually (secondary click + rename). Then please copy path to yml file. {{ :txtformat_mac_installation.png?nolink&400 |}} Then type: conda env create -f *\hfm_1.1.2.yml. Instead of "*" you have to add the local path to the folder where the yml file is now located. (ATTENTION: The file path must not contain any spaces! You can write the path in double quotes or completely without quotes). It is also possible to simply drag the yml file into the terminal window, then the file path will be added automatically. This process can take several minutes. Your screen will look something like this: {{ :ymlformat_hfm_mac_installation.png?nolink |}} At the end of the screen you will now find a note: To activate this environment, use $ conda activate hfm_1.1.2 Activate the hfm environment by entering the command in the window and confirming it. Note to enter the displayed version number (here *_1.1.2*)! conda activate hfm_1.1.2 or conda activate hfm. {{ :activateconda_mac_installation.png?nolink |}} Now close the window with the command 'exit'. ====3 starting-jupyter-notebooks==== At **Anaconda** the program //Jupyter Notebook// is started via a new icon //Jupyter-Notebook (hfm_1.x.x)//, which is located in the start menu in the new //Anaconda// folder and which you can simply click on. The Jupyter notebooks will then open in the browser.\. At the same time a command window will open, but you don't need to pay any attention to it. However, you must not close the window until the Jupyter notebook is finished!\ Alternatively you can start the "Anaconda Navigator" and there the icon //Jupyter-Notebook//. In case of a **Miniconda** installation, a command window (//Power Shell//, //Anaconda Prompt// etc.) can also be opened to start the Jupyter notebooks and the command //jupyter notebook// can be entered. \\ If you want to use a different browser, you can copy the URL to the new browser of your choice or copy the //local host// address displayed in the command window to the new browser of your choice. A short tutorial on the startup and basic functions of Jupyter Notebook can be found [[jupyter-basic|here]]. Once you have started your first Jupyter Notebook, you will need to permanently integrate the score display into the Jupyter Notebooks using the MuseScore note editor and adjust other settings. For this, detailed instructions can be found at the beginning of the tutorial [[https://analyse.hfm-weimar.de/jupyter/Jupyter_Noten_Basics_Grundlagen_music21.ipynb|Jupyter_Notes_Basics_basics_music21]]. For **Miniconda (with terminal)**, some Catalina operating systems have a problem with the installation package. In these cases, it is recommended to run the program through the terminal. To start the Jupyter Notebook, you must use these commands in the following order: **1.** conda init or conda init zsh. **2.** conda activate hfm_1.x.x or conda activate hfm. **3.** Jupyter Notebook. For more helpful hints on installing //Anaconda// or //Miniconda// for Mac OSX (in English), see the following links: * [[https://www.youtube.com/watch?v=xtcBQvZ3a5Q|YouTube tutorial]] * [[https://www.anaconda.com/blog/how-to-restore-anaconda-after-macos-catalina-update|Note: How to Restore Anaconda after Update to MacOS Catalina]] * [[https://github.com/ContinuumIO/anaconda-issues/issues/10998|Github-Troubleshouting]]