Changes between Version 28 and Version 29 of DevNotes/DevGuide/CondaDevSetup
- Timestamp:
- Aug 21, 2018 10:13:45 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevNotes/DevGuide/CondaDevSetup
v28 v29 7 7 * 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. 8 8 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 priv lidges. 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]] 10 10 * 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. 11 11 … … 35 35 conda env create -f sasview-env-build_linux.yml 36 36 }}} 37 === Other dependencies === 38 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: 37 39 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:40 40 {{{ 41 41 conda install -c conda-forge make 42 42 }}} 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. 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 Ensure that you add the install directory to your PATH. 45 44 46 45 '''''TODO: Mac instructions?''''' … … 73 72 }}} 74 73 == [=#anchor1 Step 6 - try the new qt gui (work in progress)] == 75 ''Some notes, updated 5th June2018, 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.'' 76 75 77 76 SasView 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. 78 77 79 Using Git Bash, {{{cd}}}to your sasview directory and run:78 Using Git Bash, `cd` to your sasview directory and run: 80 79 81 80 {{{ 82 81 git checkout ESS_GUI 83 82 }}} 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 85 There are now a number of operating system dependent .yml files in sasview/build_tools, cd to there then e.g. for Windows 86 87 {{{ 88 conda env create -f conda_qt5_win.yml --name qt5 89 }}} 85 90 86 91 ''[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.]'' … … 89 94 90 95 {{{ 91 conda env create -f=/path-to-your-new-yml-file/conda_py3_qt5_env_new.yml92 96 conda activate qt5 93 97 }}} 94 98 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. 99 or else do [is there any difference?]: 100 {{{ 101 source activate qt5 102 }}} 97 103 98 You can now run {{{python run.py}}} as usual to start the application. 104 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 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 106 You can now run `python run.py` as usual to start the application. 99 107 100 108 ''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.'' 101 109 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.'' 103 111 104 112 === 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. 108 114 109 115 ---- 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. 113 117 114 118 ---- 119 If 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. 115 120 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` 119 122 120 123 ---- 121 122 124 == [=#anchor1 Step 7 - Install Git (Optional)] == 123 125 Install Git for your platform by following instructions: