gsisshÃÂ holodeck1.aei.uni-hannover.deor when logged in
cd ~We will create the virtual environment here as this folder is shared across all machines. Furthermore, this way you can more easily start your environment from anywhere. To setup a virtual environment choose a name (i.e. 'env') and replace <name> in the code with it. After use the following commands.
virtualenv <name> source <name>/bin/activate pip install --upgrade pip pip install --upgrade setuptools deactivateThe commands do the following (from top to bottom):
source ~/<name>/bin/activateWhen inside this environment you can install packages locally such that they do not effect the entire system. Packages installed in this environment will only be accessible when the environment is active. You can check if you are in an environment by looking at your command line. If you are inside the environment you should see
(<name>)$USERNAME@holodeck:where <name> is the name of the environment and $USERNAME is your own username. To deactivate the environment and return to the standard system, type
deactivate
gsissh holodeck1.aei.uni-hannover.deor when logged in
cd ~We will create the virtual environment here as this folder is shared across all machines. Furthermore, this way you can more easily start your environment from anywhere. To setup a virtual environment choose a name (i.e. 'env') and replace <name> in the code with it. After use the following commands.
virtualenv <name> -p python3.4The commands do the following (from top to bottom):
source <name>/bin/activate
pip3 install --upgrade pip
pip3 install --upgrade setuptools
deactivate
Setting up the virtual environment with name <name> for Python 3
Starting the virtual environment with name <name>
python3 -Vand change the first command to the correct version number (only the second digit has to change).
python3 -VTherefore the first command to setup the virtual environment has to be
>> Python 3.6.7
virtualenv <name> -p python3.6
source ~/<name>/bin/activateWhen inside this environment you can install packages locally such that they do not effect the entire system. Packages installed in this environment will only be accessible when the environment is active. You can check if you are in an environment by looking at your command line. If you are you should see
(<name>)$USERNAME@holodeck:where <name> is the name of the environment and $USERNAME is your own username. Also, inside of this environment you can run Python 3 scripts simply by typing
python <script_name>.pyas Python 3 is the standard interpreter within. To deactivate the environment and return to the standard system, type
deactivate
curl -O <download_link> (curl -O https://repo.anaconda.com/archive/Anaconda2-2019.03-Linux-x86_64.sh)This command will download the installer to your home directory.
sha256sum <file_name> (sha256sum Anaconda2-2019.03-Linux-x86_64.sh)which will produce an output of the following form
<string> <file_name> (cedfee5b5a3f62fcdac0a1d2d12396d0f232d2213d24d6dc893df5d8e64b8773 Anaconda2-2019.03-Linux-x86_64.sh)The string is the hash value which you can compare to the Anaconda website here. (Make sure to choose the correct version you have downloaded. To compare the hash with the one on the website simply copy the string and search for it on the corresponding version website using Ctrl + F in your local browser.) If the strings match, your installer is valid.
bash <file_name> (bash Anaconda2-2019.03-Linux-x86_64.sh)You will be prompted with the Anaconda End User License Agreement. Read it and (if you do so) accept it in the end by typing 'yes'. ('y' won't work, to scroll down press Enter) After having accepted the License Agreement Anaconda will ask you where to install. If you are unsure simply leave it at the default location by pressing Enter without entering anything. (The default location is your /holohom/$USERNAME directory) The final question the installer will ask you is whether or not you want to initialize Anaconda. Again type 'yes'. Now restart your console and your environment will be set up. To finalize the installation process we want to remove the installer. For this type
rm <file_name> (rm Anaconda2-2019.03-Linux-x86_64.sh)
source ~/.bashrcInside this environment Python will run on the Anaconda interpreter and you can install packages via
conda install <package_name>To create a new environment called <environment_name> type
conda create --name <environment_name>You can activate your new environment by typing
source activate <environment_name>For more information refer to the Conda User Guide or the Conda Cheat Sheet.
conda deactivate
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
![]() |
Anaconda_install_1_large.png | manage | 32 K | 30 Apr 2019 - 15:20 | MarlinSchFer | Graphics showing the correct version to download. |