Changes between Version 28 and Version 29 of DevNotes/CondaDevSetup


Ignore:
Timestamp:
Aug 21, 2018 12:13:45 PM (3 months ago)
Author:
richardh
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • DevNotes/CondaDevSetup

    v28 v29  
    77 * At the Advanced Options screen, you need to consider whether or not you want to make Anaconda your default version of Python.  Developers who do not work on multiple Python projects can just accept the defaults here. 
    88 
    9  * By default of Windows anaconda is installed for single user and not "everyone", which means you cannot run the conda command from an arbitrary command window. If you proceeded with default installation, you need to open Anaconda Prompt from Menu Start. Otherwise you can install anaconda for everyone, which requires root privlidges. If "conda" is not a recognised command then add the install directory to your Windows user Path variable.[[BR]] 
     9 * By default of Windows anaconda is installed for single user and not "everyone", which means you cannot run the conda command from an arbitrary command window. If you proceeded with default installation, you need to open Anaconda Prompt from Menu Start. Otherwise you can install anaconda for everyone, which requires root privileges. If "conda" is not a recognised command then add the install directory to your Windows user Path variable.[[BR]] 
    1010 * If you have a failing reference to a "conda.binstar.org/!PeterParker/win-64/repodata.json" file, then edit this out of the anaconda start up file at users/username/.condarc as you may still have left it there from an older sasview installation system. 
    1111 
     
    3535conda env create -f sasview-env-build_linux.yml 
    3636}}} 
     37=== Other dependencies === 
     38Note that in order to build the documentation, you will require a version of GNU Make (the `make` command). On Linux, you can obtain this with your package manager. On Windows 7, activate your new conda environment and run the following: 
    3739 
    38 === Other dependencies === 
    39 Note that in order to build the documentation, you will require a version of GNU Make (the {{{make}}} command). On Linux, you can obtain this with your package manager. On Windows 7, activate your new conda environment and run the following: 
    4040{{{ 
    4141conda install -c conda-forge make 
    4242}}} 
    43 On Windows 10, you may find that the {{{make}}} command does not work with the above method. You can find a Windows-compatible build of GNU Make here: http://gnuwin32.sourceforge.net/packages/make.htm 
    44 Ensure that you add the install directory to your PATH. 
     43On Windows 10, you may find that the `make` command does not work with the above method. You can find a Windows-compatible build of GNU Make here: http://gnuwin32.sourceforge.net/packages/make.htm Ensure that you add the install directory to your PATH. 
    4544 
    4645'''''TODO: Mac instructions?''''' 
     
    7372}}} 
    7473== [=#anchor1 Step 6 - try the new qt gui (work in progress)] == 
    75 ''Some notes, updated 5th June 2018, based on a Windows 7 install. If you just want to see what the new GUI looks like, Piotr may have a downloadable installer.'' 
     74''Some notes, updated 21 August 2018, based on a Windows 7 install. If you just want to see what the new GUI looks like, Piotr may have a downloadable installer.'' 
    7675 
    7776SasView is being reworked, in the ESS_GUI git branch, to use PyQT 5.0 for the GUI. Please note that this branch uses '''exclusively Python 3'''. There is no need to install Anaconda again, though, because the environment YAML file (see below) will ensure that Python 3 is installed. 
    7877 
    79 Using Git Bash, {{{cd}}} to your sasview directory and run: 
     78Using Git Bash, `cd` to your sasview directory and run: 
    8079 
    8180{{{ 
    8281git checkout ESS_GUI 
    8382}}} 
    84 Look for {{{sasview/build_tools/conda_py3_qt5_env.yml}}}, open it in an editor, save it somewhere else '''outside''' of git control, '''remove''' in the pip section the lines for {{{sasview}}} and {{{sasmodels}}}, then '''add''' there: {{{- tinycc==1.1}}} (the compiler for the models). 
     83[ Previously we had : Look for `sasview/build_tools/conda_py3_qt5_env.yml`, open it in an editor, save it somewhere else '''outside''' of git control, '''remove''' in the pip section the lines for `sasview` and `sasmodels`, then '''add''' there: `- tinycc==1.1` (the compiler for the models). ] 
     84 
     85There are now a number of operating system dependent .yml files in sasview/build_tools, cd to there then e.g. for Windows 
     86 
     87{{{ 
     88conda env create -f conda_qt5_win.yml --name qt5 
     89}}} 
    8590 
    8691''[Note - if later whilst running sasview you have problems with models not compiling or loading, close sasview, delete the contents of the directory users/your-user-name/sasmodels/compiled_models, then re-start, which will force re-compilation using the current compiler.]'' 
     
    8994 
    9095{{{ 
    91 conda env create -f=/path-to-your-new-yml-file/conda_py3_qt5_env_new.yml 
    9296conda activate qt5 
    9397}}} 
    9498 
    95 On Windows, as of July 2018, you will need to install Build Tools for Visual Studio 2015. This is found under the 2017 label, confusingly: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017 
    96 Download the installer and run it. Find "Visual Studio Build Tools 2017" and click Install. In the window that appears, navigate to "Individual components" and ensure that "VC++ 2015.3 v14.00 (v140) toolset for desktop" and a relevant Windows SDK (e.g. Windows 10 SDK, if you are using Windows 10) are selected. Finally, click Install. 
     99or else do [is there any difference?]: 
     100{{{ 
     101source activate qt5 
     102}}} 
    97103 
    98 You can now run {{{python run.py}}} as usual to start the application. 
     104On Windows, as of July 2018, you will need to install Build Tools for Visual Studio 2015. This is found under the 2017 label, confusingly: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017 Download the installer and run it. Find "Visual Studio Build Tools 2017" and click Install. In the window that appears, navigate to "Individual components" and ensure that "VC++ 2015.3 v14.00 (v140) toolset for desktop" and a relevant Windows SDK (e.g. Windows 10 SDK, if you are using Windows 10) are selected. Finally, click Install. 
     105 
     106You can now run `python run.py` as usual to start the application. 
    99107 
    100108''If run.py gives an error from line 1140 in readCategoryInfo, you likely have the old version of the categories file. Delete the file serial_cat.json from your user directory  ( c:/users/username/.sasview in Windows) and then run the latest *release* version of sasview. This will automatically generate the correct categories.json file.'' 
    101109 
    102 ''If qt5 sasview does not run the first time through, try going back to the normal sasview master ({{{git checkout master}}}), then repeat the steps above once more (trust me it may then work!). Piotr and others will be making this easier in the future.'' 
     110''If qt5 sasview does not run the first time through, try going back to the normal sasview master (`git checkout master`), then repeat the steps above once more (trust me it may then work!). Piotr and others will be making this easier in the future.'' 
    103111 
    104112=== Other useful conda commands === 
    105  
    106 {{{conda info --envs}}} 
    107 This will show that you now have both sasview and qt5 environments. 
     113`conda info --envs` This will show that you now have both sasview and qt5 environments. 
    108114 
    109115---- 
    110  
    111 {{{conda env remove --name qt5}}} 
    112 This will remove the qt5 environment, though the files involved seem to stay on your hard drive so a new {{{conda env create}}} is much faster than the first time. 
     116`conda env remove --name qt5` This will remove the qt5 environment, though the files involved seem to stay on your hard drive so a new `conda env create` is much faster than the first time. 
    113117 
    114118---- 
     119If something fails part way through creating an environment, such as not removing the pip install for sasview & sasmodels, then "update" will be faster (though is not generally recommended, stick to "create") e.g. 
    115120 
    116 If something fails part way through creating an environment, such as not removing the pip install for sasview & sasmodels, then "update" will be faster e.g. 
    117  
    118 {{{conda env update -f=/path to your new yml file/conda_py3_qt5_env_new.yml --name qt5}}} 
     121`conda env update -f=/path to file/conda_py3_qt5_env.yml --name qt5` 
    119122 
    120123---- 
    121  
    122124== [=#anchor1 Step 7 - Install Git (Optional)] == 
    123125Install Git for your platform by following instructions: