conda create -n iannwtf python=3.7
-n or -name is the name option
How to activate environment to work with it:
conda activate iannwtf
command line starts with (iannwtf)
then
conda install
does work to install packages like TensorFlow, but we use pipinstall
because typically pip
is better kept up to date than conda for package updates.
Install pip inside of virtual conda environment
conda install pip
Get a list of all installed packages in our virtual environment:
conda list
Before you advance, please confirm that this list (should still be rather empty) contains pip now. We need to make sure of this, because when subsequently we use pip to install further packages, if we do not have pip in our virtual conda env, this will use your system’s pip to install python packages into your user, instead of the virtual env’s pip to install packages into your virtual env
seems to be not working therefore upgrade pip with:pip install -upgrade pip
pip install --upgrade pip
Installs packages and sub-dependencies
pip install tensorflow
pip install matplotlib
run test python script to verify tensorflow and matplotlib have been installed properly (assuming you are in the homework01 folder):
python .\test_tensorflow.py
Testing if GPU acceleration is working
import tensorflow as tf
from tensorflow.python.client import device_lib
tf.test.gpu_device_name()
device_lib.list_local_devices()
- Go to https://repo.anaconda.com/archive/
- download shell script
wget https://repo.anaconda.com/archive/Anaconda3-20XX.XXXXXXXX-Linux-x86_64.sh
- check the md5 checksum and run the downloaded file
md5sum Anaconda3-2019.03-Linux-x86_64.sh
bash Anaconda3-2019.03-Linux-x86_64.sh
remove shell script after installation
rm Anaconda3-2019.03-Linux-x86_64.sh
Now you should be able to start up your Anaconda environment:
source ~anaconda3/bin/activate
“~anaconda3/bin/activate” is default place that Anaconda will install itself but if you chose elsewhere simply point to that directory.
Once activated, initiate a full update:
conda update --all