Full exemple : Anaconda Env : Stockwell
Install Anaconda
Get Anaconda
https://www.anaconda.com/download/#linux
$ cd /tmp
/tmp $ wget https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh
--2018-12-04 10:48:00-- https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh
Résolution de repo.anaconda.com (repo.anaconda.com)… 104.17.108.77, 104.17.109.77, 104.17.110.77, ...
Connexion à repo.anaconda.com (repo.anaconda.com)|104.17.108.77|:443… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 667976437 (637M) [application/x-sh]
Enregistre : «Anaconda3-5.3.1-Linux-x86_64.sh»
Anaconda3-5.3.1-Linux-x86_64.sh 100%[=============>] 637.03M 83.3MB/s ds 7.4s
2018-12-04 10:48:07 (86.2 MB/s) - «Anaconda3-5.3.1-Linux-x86_64.sh» enregistré [667976437/667976437]
/tmp $
Install Anaconda
/tmp $ sh Anaconda3-5.3.1-Linux-x86_64.sh
[...]
Anaconda3 will now be installed into this location:
/home/mylogin/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/lecocq/anaconda3] >>> /localstorage/mylogin/Anaconda
PREFIX=/localstorage/nomad/Anaconda
installing: python-3.7.0-hc3d631a_0 ...
Python 3.7.0
[...]
installing: anaconda-5.3.1-py37_0 ...
installation finished.
Do you wish the installer to initialize Anaconda3
in your /home/lecocq/.bashrc ? [yes|no]
[no] >>> yes
Initializing Anaconda3 in /home/lecocq/.bashrc
A backup will be made to: /home/lecocq/.bashrc-anaconda3.bak
For this change to become active, you have to open a new terminal.
Thank you for installing Anaconda3!
[...]
Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
>>> no
Load Anaconda
Open a New terminal :
$ conda activate
(base) $
get last Anaconda update
$ conda update --prefix /localstorage/nomad/Anaconda anaconda
[...]
Proceed ([y]/n)? y
[...]
$
create new dedicated Anaconda env for stockwell
list your actual environments
$ conda activate
(base) $ conda env list
# conda environments:
#
base * /localstorage/nomad/Anaconda
(base)
create env stockwell
(base) $ conda create --name stockwell
Solving environment: done
## Package Plan ##
environment location: /localstorage/nomad/Anaconda/envs/stockwell
Proceed ([y]/n)?
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate stockwell
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) $
list your new environments
(base) $ conda env list
# conda environments:
#
base * /localstorage/nomad/Anaconda
stockwell /localstorage/nomad/Anaconda/envs/stockwell
(base) $
activate your new environments
$ conda activate stockwell
(stockwell) $
install stockwell
https://github.com/synergetics/stockwell_transform
install Requirements
- gcc
it’s already installed on sismologic computers :
$ which gcc
/usr/bin/gcc
nomad@saahre:~$ gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$
- fftw3 libraries
$ dpkg -l | grep fftw3-dev
If you have no result here, juste ask your administrator to install this package on your computer.
- numpy
(stockwell) $ conda install numpy
[...]
Proceed ([y]/n)? y
[...]
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
$
clone stockwell repository
(stockwell) $ mkdir -p /localstorage/mylogin/GitHub
(stockwell) $ cd /localstorage/mylogin/GitHub
(stockwell) $ git clone https://github.com/synergetics/stockwell_transform.git
(stockwell) $ cd stockwell_transform
Build and install stockwell
(stockwell) $ pwd
/localstorage/mylogin/GitHub/stockwell_transform
(stockwell) python ./setup.py build
(stockwell) python ./setup.py install
[...]
Installed /localstorage/nomad/Anaconda/envs/stockwell/lib/python3.6/site-packages/stockwell-0.0.5-py3.6-linux-x86_64.egg
Processing dependencies for stockwell==0.0.5
Finished processing dependencies for stockwell==0.0.5
(stockwell) $
ckeck package list
(stockwell) $ conda list | grep stockwell
stockwell 0.0.5 <pip>
(stockwell) $