Setting up the Python Environments
Conda allows us to set up a defined environment with specific versions of the python version as well as
of the packages.
conda environment: jh_class
This environment works with most of the modules in the class.
conda create -n jh_class python=3.10
Then activate this environment before installing packages!
conda activate jh_class
Install specific packages:
conda install -c conda-forge tensorflow=2.15.0 -y
conda install -c conda-forge pandas=2.2.0 -y
conda install -c conda-forge scikit-learn=1.6.1 -y
conda install -c conda-forge matplotlib=3.8.3 -y
conda install -c conda-forge ipython=8.21.0 -y
conda install -c conda-forge transformers=4.37.2 -y
conda install -c conda-forge jupyter=1.0.0 -y
conda install -c conda-forge sentencepiece=0.1.99 -y
conda install -c conda-forge click=8.0.4 -y
Install packages (without version number):
conda install -c conda-forge imageio -y
conda install -c conda-forge keras-preprocessing -y
conda install -c conda-forge pydot -y
conda install -c conda-forge tensorflow-datasets -y
conda install -c conda-forge bayesian-optimization -y
This command lists the package versions that are installed in the currently active environment:
conda list
Result:
Computer without GPU
Computer with GPU
conda environment: stylegan3
Module 7 Part 7.2
The class module of class 07_2 uses stylegan2, however the environment did not work with the RTX 3090
card.
Instead, I am using the stylegan3 examples from
https://github.com/NVlabs/stylegan3
Details on the stylgan3 environment are on the computer vision page:
Computer Vision
conda environment: tabgan
Module 7 Part 7.5
Adding tabgan to jh_class will corrupt the jh_class environment such that the class programs
will not run any longer,
It is better to create a separate conda environment for the tabgan module 7.5.
https://github.com/Diyago/Tabular-data-generation
To run the included example:
Create conda environment
conda create -n mytabgan python=3.10
Activate conda environment
conda activate mytabgan
Install packages
conda install -y pandas
pip install tabgan
conda environment: ensemble
Module 8 Part 8.2 - Biological Response with Neural Network - Neural Network Ensemble
class_08_2_keras_ensembles_bio_blend.py
conda create -n ensemble python=3.7
conda install -c conda-forge numpy -y
conda install -c conda-forge pandas -y
conda install -c conda-forge tensorflow -y
pip install scikit-learn
Other
The syntax for version numbers in pip is
pip install tensorflow==2.15.0
but we don't want to install anything outside of conda,
so that we know that we are using the intended versions of our packages.