| 22 | |
| 23 | |
| 24 | ==== Install Packages to Anaconda Python ==== |
| 25 | 'conda' is the command to add packages to Anaconda python distribution. However, since you don't have a permission in /share/apps/anaconda, it won't work. |
| 26 | There is a workaround. Here, for example, we want to add 'vtk' python wrapper library. |
| 27 | |
| 28 | {{{ |
| 29 | conda install vtk |
| 30 | }}} |
| 31 | |
| 32 | But you will see an error message with an instruction for the workaround. First clone the python environment into your home directory by |
| 33 | |
| 34 | {{{ |
| 35 | conda create -n my_root --clone=/share/apps/anaconda/2/2.5.0 |
| 36 | }}} |
| 37 | |
| 38 | then, |
| 39 | |
| 40 | {{{ |
| 41 | source activate my_root |
| 42 | }}} |
| 43 | |
| 44 | Finally, you can install the package, |
| 45 | |
| 46 | {{{ |
| 47 | conda install vtk |
| 48 | }}} |
| 49 | |
| 50 | In case you encounter "Error: 'conda' can only be installed into the root environment", try |
| 51 | |
| 52 | {{{ |
| 53 | conda remove conda-build |
| 54 | conda remoce conda-env |
| 55 | conda update -all |
| 56 | conda install vtk |
| 57 | }}} |
| 58 | |
| 59 | From next time, to use Anaconda python, |
| 60 | {{{ |
| 61 | module load anaconda |
| 62 | source activate my_root |
| 63 | }}} |