Changes between Version 7 and Version 8 of InstallConda
- Timestamp:
- Jan 1, 2021 6:37:28 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallConda
v7 v8 1 1 = Installing GSAS-II via conda (Anaconda Python) = 2 2 3 Python enthusiasts are likely quite familiar with the [https://www.anaconda.com/what-is-anaconda/ Anaconda package manager]. GSAS-II can be installed using a simple conda command, after installing [https://www.anaconda.com/download anaconda] or [https://conda.io/miniconda.html miniconda]. We are recommending Python 3.7. With Python 3.8or later, you will likely need to compile binaries. When this conda package is used, it ensures that the [https://gsas-ii.readthedocs.io/en/latest/packages.html packages required by GSAS-II] are installed, including subversion, and then subversion is used to download the latest version of GSAS-II from the APS server. This download will fail if your computer network3 Python enthusiasts are likely quite familiar with the [https://www.anaconda.com/what-is-anaconda/ Anaconda package manager]. GSAS-II can be installed using a simple conda command, after installing [https://www.anaconda.com/download anaconda] or [https://conda.io/miniconda.html miniconda]. We are currently recommending Python 3.8. With Python 3.9 or later, you will likely need to compile binaries. When this conda package is used, it ensures that the [https://gsas-ii.readthedocs.io/en/latest/packages.html packages required by GSAS-II] are installed, including subversion, and then subversion is used to download the latest version of GSAS-II from the APS server. This download will fail if your computer network 4 4 requires a proxy ([ProxyInfo more info on proxies here]), but rerunning the bootstrap.py command (see bottom of this page) 5 5 will work after the proxy information is entered. 6 6 7 7 {{{ 8 conda install gsas2pkg= 1.1-c briantoby8 conda install gsas2pkg=2 -c briantoby 9 9 }}} 10 10 11 To use a separate conda environment for GSAS-II, use these commands to install GSAS-II: 11 12 > If the environment fails to solve, this is likely because Anaconda has not built a compatible wxpython package. As I write this, this is true for python 3.8. Change `-c briantoby` to `-c defaults -c briantoby -c conda-forge` in the command above using: 12 13 13 14 {{{ 14 conda create -n GSASII 15 conda install gsas2pkg=1.1 -c briantoby -n GSASII 15 conda install gsas2pkg=2 -c defaults -c briantoby -c conda-forge 16 16 }}} 17 Note that you may need to activate the environment manually before starting GSAS-II. 18 17 19 18 20 19 After the conda install completes, one of the following occurs: … … 26 25 * On Linux (at present) the command-line is needed to start GSAS-II: 27 26 {{{ 28 <condapath>/bin/python <condapath>/GSASII/GSASII.py 27 source <condapath>/bin/activate 28 python <condapath>/GSASII/GSASII.py 29 }}} 30 Where `<condapath>` is the location where anaconda/miniconda was installed. These commands can be found in file `<condapath>/start_GSASII.sh` 31 32 == Conda bug on Linux == 33 34 At present, it appears that conda is failing to run properly on Linux and requiring a Mac package. Use package `gsas2pkg-linux` with this command: 35 36 {{{ 37 conda install gsas2pkg-linux=2 -c briantoby 38 }}} 39 40 41 == Using a Conda Environment == 42 43 It can be a good idea to place GSAS-II in a separate environment so that package versions do not conflict. This is recommended if you have any other packages with particular version dependencies. To use a separate conda environment for GSAS-II, use these commands to install GSAS-II: 44 45 46 {{{ 47 conda create gsas2pkg=2 -c briantoby -n G2 29 48 }}} 30 49 31 **Activating**: 50 Note that you will need to activate the environment manually before starting GSAS-II (`conda activate G2`) and the GSAS-II files will be placed in <conda>/env/G2/GSAS-II. On Windows manually edit the `runGSASII.bat` file. On Mac OS X the created application seems to work OK (or use commands in `<condapath>/start_GSASII.sh`). On LInux use these use these commands: 51 52 {{{ 53 source <condapath>/bin/activate G2 54 python <condapath>/envs/G2/GSASII/GSASII.py 55 }}} 56 Where `<condapath>` is the location where anaconda/miniconda was installed. These commands can be found in file `<condapath>/start_GSASII.sh` 57 58 59 60 == Activating == 32 61 If you get an error that conda is an unknown command, this means anaconda/miniconda is not in your path (which is my recommended way to install anaconda) and you will need to first use the ananconda activate command: 33 62 … … 45 74 `...activate GSASII` 46 75 47 **Python 2.7**: We are no longer confirming that all sections of GSAS-II are compatible with Python 2.7 (but will usually fix problems, if reported). An older version of gsas2pkg is compatible with Python 2.7: 48 49 {{{ 50 conda install gsas2pkg=1.0.6 -c briantoby 51 }}} 76 **Python 2.7**: We strongly discouraging use of Python 2.7 and are no longer testing GSAS-II compatiblity with Python 2.7 (but will usually fix problems, if reported). 52 77 53 78 == GSAS-II Updates == … … 58 83 <condapath>/bin/python <condapath>/GSASII/bootstrap.py 59 84 }}} 85 86 87 == Notes on anaconda installation == 88 Here are commands that worked for me recently on Linux. 89 {{{ 90 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh> /tmp/Miniconda3-latest-Linux-x86_64.sh 91 bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/conda3 92 source /tmp/conda3/bin/activate 93 conda update --all 94 conda install gsas2pkg-linux=2 -c briantoby 95 bash 96 }}} 97 98 99 {{{ 100 conda create -n G2 gsas2pkg-linux -c briantoby 101 }}}