Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • ckaufmann/install-python-tensorflow-gym
1 result
Select Git revision
  • master
1 result
Show changes
Commits on Source (8)
No preview for this file type
......@@ -57,7 +57,7 @@
\usepackage[color=blue, author={Christof Kaufmann}]{attachfile2} % load after hyperref to avoid option clash from unicode=true
\title{Installationsanleitung für Python mit OpenAI Gym für Linux}
\date{April 2024}
\date{August 2024}
\author{Christof Kaufmann}
% one infinite page, https://tex.stackexchange.com/a/19241/115883
......@@ -124,20 +124,23 @@ Nun sollte die \texttt{base}-Environment aktiviert sein, was Sie auch am Prompt
\section{Conda-Umgebung}
Wir erstellen nun eine Umgebung namens \lstinline|ml| mit Python 3.10 und den benötigten Paketen. Falls Sie eine NVIDIA-GPU haben, ersetzen Sie \lstinline|tensorflow| durch \lstinline|tensorflow-gpu=2.10| und beachten auch die weiteren Hinweise in Abschnitt~\ref{sec:gpu}.
Wir erstellen nun eine Umgebung namens \lstinline|ml| mit Python 3.10 und den benötigten Paketen. Falls Sie eine NVIDIA-GPU haben, ersetzen Sie \lstinline|tensorflow-cpu| durch \lstinline|tensorflow-gpu| und beachten auch die weiteren Hinweise in Abschnitt~\ref{sec:gpu}.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
mamba create -n ml python=3.10 tensorflow ipympl tqdm mypy jupyter pystan \
mamba create -n ml python=3.10 tensorflow-cpu ipympl mypy jupyter pystan \
matplotlib seaborn scikit-learn openpyxl odfpy pyarrow \
geopandas descartes pyogrio spyder optuna plotly \
jax-jumpy moviepy shimmy-atari gymnasium-box2d
geopandas descartes 'pyogrio<0.8.0' optuna plotly tqdm \
jax-jumpy moviepy shimmy-atari gymnasium-box2d spyder \
ipywidgets notebook lxml fastparquet zstandard \
contextily networkx pyvis netgraph
\end{lstlisting}
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie mit \lstinline|mamba create -n <ENVNAME> <PAKETE>| auch weitere Umgebungen einrichten und diese mit \lstinline|mamba activate <ENVNAME>| aktivieren.
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie auch weitere Umgebungen mit \lstinline|mamba create -n <ENVNAME> <PAKETE>| einrichten und diese mit \lstinline|mamba activate <ENVNAME>| aktivieren.
Installieren Sie nun in der Umgebung \lstinline|ml| noch Pakete, die es (noch) nicht in conda-forge gibt, sondern nur in PyPI. Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
Installieren Sie nun in der Umgebung \lstinline|ml| noch Pakete, die es (noch) nicht in conda-forge gibt, sondern nur in PyPI (bzw.\ EMNIST auf PyPI ist veraltet und wir verwenden direkt die Version von github). Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) \color{green!80!black}john \color{gray}\color{blue!90!black!70}\textasciitilde\ \color{gray}\$* mamba activate ml #*\color{cyan}\# \itshape wir wollen in 'ml' installieren*
#*\color{gray}(ml) \color{green!80!black}john \color{gray}\color{blue!90!black!70}\textasciitilde\ \color{gray}\$* pip install emnist autorom[accept-rom-license]
#*\color{gray}(ml) \color{green!80!black}john \color{gray}\color{blue!90!black!70}\textasciitilde\ \color{gray}\$* pip install git+https://github.com/hosford42/EMNIST.git \
autorom[accept-rom-license]
\end{lstlisting}
......@@ -159,9 +162,8 @@ Installieren Sie nun in der Umgebung \lstinline|ml| noch Pakete, die es (noch) n
Installieren Sie auch \lstinline|ptxas| über das nvidia-Repository um eine Warnmeldung beim Importieren von TensorFlow zu vermeiden:
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
mamba activate ml #*\color{cyan}\# \itshape sicherstellen, dass Sie in der 'ml' Umgebung sind*
mamba install --no-deps -c nvidia -c conda-forge tensorflow-gpu=2.10 cuda-nvcc
mamba install -c nvidia -c conda-forge cuda-nvcc
\end{lstlisting}
Falls bei der Installation von \lstinline|cuda-nvcc| der Fehler \texttt{[Errno 2] No such file or directory: '/.../miniforge/nvvm/bin'} auftritt, versuchen Sie \lstinline|/../miniforge/nvvm| zu löschen -- möglicherweise ist dies ein verwaister symbolischer Link -- und \lstinline|cuda-nvcc| erneut zu installieren.
\section{IDE}
......@@ -191,7 +193,7 @@ Spyder öffnet sich nun. Wenn Sie die Plots lieber in eigenständigen Fenster an
\includegraphics[width=\linewidth]{images/spyder-pref}
\vspace{-2em}
Laden Sie nun in Spyder das Testprogramm \texttt{mnistKeras.py} (\textattachfile{attachments/mnistKeras.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras.py?inline=false}{Web}).
Laden Sie nun in Spyder das Testprogramm \texttt{mnistKeras3.py} (\textattachfile{attachments/mnistKeras3.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras3.py?inline=false}{Web}).
Starten Sie das Skript durch Drücken auf \keystroke{F5} bzw.\ den grünen Play-Button oben in Werkzeugleise bzw.\ über das Menü \textit{Run} $\rightarrow$ \textit{Run}.
\vspace{-1ex}
......@@ -209,7 +211,7 @@ Starten Sie VS Code z.\,B.\ über die Kommandozeile mit:
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
code
\end{lstlisting}
Speichern Sie das Testprogramm \texttt{mnistKeras.py} (\textattachfile{attachments/mnistKeras.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras.py?inline=false}{Web}) und klicken in VS Code auf Open Folder um das darüberliegende Verzeichnis zu öffnen. Öffnen Sie dann die Datei \texttt{mnistKeras.py}. Wie in der Abbildung dargestellt, installieren Sie die Python-Extension (Schritte 1–3) und wählen Sie den installierten Python-Interpreter (\lstinline|ml|) aus (Schritte 4–5). Falls Ihre Installation dort nicht auftaucht, wählen Sie bei \textit{Enter interpreter path...} den Installationspfad zur Binärdatei \lstinline|python| aus, also z.\,B.\ \texttt{\char`~/.local/opt/miniforge/envs/ml/bin/python}. Klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster (Schritt 6):
Speichern Sie das Testprogramm \texttt{mnistKeras3.py} (\textattachfile{attachments/mnistKeras3.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras3.py?inline=false}{Web}) und klicken in VS Code auf Open Folder um das darüberliegende Verzeichnis zu öffnen. Öffnen Sie dann die Datei \texttt{mnistKeras3.py}. Wie in der Abbildung dargestellt, installieren Sie die Python-Extension (Schritte 1–3) und wählen Sie den installierten Python-Interpreter (\lstinline|ml|) aus (Schritte 4–5). Falls Ihre Installation dort nicht auftaucht, wählen Sie bei \textit{Enter interpreter path...} den Installationspfad zur Binärdatei \lstinline|python| aus, also z.\,B.\ \texttt{\char`~/.local/opt/miniforge/envs/ml/bin/python}. Klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster (Schritt 6):
\vspace{-1em}
\noindent
......@@ -236,10 +238,11 @@ Dadurch erhalten Sie rechts eine Konsole in dem eine interaktive Python-Session
Hier ist kurz beschrieben, was das Testskript macht damit Sie einschätzen können, ob alles funktioniert hat. Das gilt sowohl für Spyder als auch für VS Code.
Rechts in der Konsole wird als Erstes die TensorFlow-Version ausgegeben, z.\,B.:
Rechts in der Konsole werden als Erstes die TensorFlow- und Keras-Version ausgegeben, z.\,B.:
\begin{lstlisting}
=========================
Tensorflow Version 2.10.0
TensorFlow Version 2.17.0
Keras Version 3.5.0
=========================
\end{lstlisting}
TensorFlow lädt danach einmalig die benötigten Daten herunter und trainiert anschließend ein neuronales Netz. Dabei wird der Trainingsfortschritt angezeigt. Anschließend wird die Genauigkeit auf der Testmenge ausgegeben und Beispielbilder geplottet. Wenn das Testprogramm durchläuft, ist TensorFlow erfolgreich installiert.
......
No preview for this file type
......@@ -52,7 +52,7 @@
\title{Installationsanleitung für Python mit OpenAI Gym für Windows}
\date{April 2024}
\date{August 2024}
\author{Christof Kaufmann}
......@@ -128,16 +128,15 @@ Nun sollte die \texttt{base}-Environment aktiviert sein, was Sie auch am Prompt
Wir erstellen nun eine Umgebung namens \lstinline|ml| mit Python 3.10 und den benötigten Paketen.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
mamba create -n ml python=3.10 matplotlib ipympl ipywidgets seaborn plotly git ^
scikit-learn optuna astunparse mypy jupyter notebook spyder ^
openpyxl odfpy lxml pyarrow fastparquet zstandard geopandas ^
"pyogrio<0.8.0" contextily networkx pyvis netgraph ^
jax-jumpy moviepy shimmy-atari gymnasium-box2d
mamba create -n ml python=3.10 seaborn plotly matplotlib ipympl ipywidgets ^
scikit-learn optuna astunparse git jupyter notebook spyder ^
openpyxl odfpy lxml pyarrow fastparquet zstandard mypy ^
geopandas "pyogrio<0.8.0" contextily networkx netgraph ^
pyvis jax-jumpy moviepy shimmy-atari gymnasium-box2d
\end{lstlisting}
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie mit \lstinline|mamba create -n <MYENVNAME> <PAKETE>| auch weitere Umgebungen einrichten und diese mit \lstinline|mamba activate <MYENVNAME>| aktivieren.
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie auch weitere Umgebungen mit \lstinline|mamba create -n <MYENVNAME> <PAKETE>| einrichten und diese mit \lstinline|mamba activate <MYENVNAME>| aktivieren.
Anschließend installieren wir noch Pakete mit \lstinline|pip| aus dem PyPI-Repository in der Umgebung \lstinline|ml|, die es im \lstinline|conda-forge|-Repository nicht gibt. Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
Anschließend installieren wir noch Pakete mit \lstinline|pip| aus dem PyPI-Repository (bzw.\ von github) in der Umgebung \lstinline|ml|, die es im \lstinline|conda-forge|-Repository nicht gibt. Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*mamba activate ml
#*\color{gray}(ml) C:\textbackslash Users\textbackslash john>*pip install tensorflow-cpu
......@@ -171,7 +170,7 @@ Spyder öffnet sich nun. Wenn Sie die Plots lieber in eigenständigen Fenster an
\includegraphics[width=\linewidth]{images/spyder-pref}
\vspace{-2em}
Laden Sie nun in Spyder das Testprogramm \texttt{mnistKeras.py} (\textattachfile{attachments/mnistKeras.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras.py?inline=false}{Web}).
Laden Sie nun in Spyder das Testprogramm \texttt{mnistKeras3.py} (\textattachfile{attachments/mnistKeras3.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras3.py?inline=false}{Web}).
Starten Sie das Skript durch Drücken auf \keystroke{F5} bzw.\ den grünen Play-Button oben in Werkzeugleise bzw.\ über das Menü \textit{Run} $\rightarrow$ \textit{Run}.
\vspace{-1ex}
......@@ -187,7 +186,7 @@ VS Code wird unabhängig von Mamba installiert und man wählt nachträglich die
Laden Sie es \href{https://code.visualstudio.com/docs/?dv=win64user}{hier} herunter und installieren es. Anschließend öffnen Sie VS Code. In VS Code drücken Sie \keystroke{Ctrl}+\keyshift+\keystroke P, suchen Sie die Einstellung \textit{Terminal: Select Default Profile} und wählen Sie \textit{Command Prompt}.
Speichern Sie das Testprogramm \texttt{mnistKeras.py} (\textattachfile{attachments/mnistKeras.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras.py?inline=false}{Web}) und klicken in VS Code auf Open Folder um das darüberliegende Verzeichnis zu öffnen. Öffnen Sie dann die Datei \texttt{mnistKeras.py}. Installieren Sie die Python-Extension (Schritte 1–3) und wählen Sie den installierten Python-Interpreter (\lstinline|ml|) aus (Schritte 4–5). Falls Ihre Installation dort nicht auftaucht, wählen Sie bei \textit{Enter interpreter path...} den Installationspfad zur Binärdatei \lstinline|python| aus, also z.\,B.\ \verb|~\miniforge\envs\ml\python.exe|. Klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster:
Speichern Sie das Testprogramm \texttt{mnistKeras3.py} (\textattachfile{attachments/mnistKeras3.py}{Anhang}|\href{https://gitlab.cvh-server.de/ckaufmann/install-python-tensorflow-gym/-/raw/master/attachments/mnistKeras3.py?inline=false}{Web}) und klicken in VS Code auf Open Folder um das darüberliegende Verzeichnis zu öffnen. Öffnen Sie dann die Datei \texttt{mnistKeras3.py}. Installieren Sie die Python-Extension (Schritte 1–3) und wählen Sie den installierten Python-Interpreter (\lstinline|ml|) aus (Schritte 4–5). Falls Ihre Installation dort nicht auftaucht, wählen Sie bei \textit{Enter interpreter path...} den Installationspfad zur Binärdatei \lstinline|python| aus, also z.\,B.\ \verb|~\miniforge\envs\ml\python.exe|. Klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster:
\vspace{-1em}
\noindent
......@@ -214,10 +213,11 @@ Dadurch erhalten Sie rechts eine Konsole in dem eine interaktive Python-Session
Hier ist kurz beschrieben, was das Testskript macht damit Sie einschätzen können, ob alles funktioniert hat. Das gilt sowohl für Spyder als auch für VS Code.
Rechts in der Konsole wird als Erstes die TensorFlow-Version ausgegeben, z.\,B.:
Rechts in der Konsole werden als Erstes die TensorFlow- und Keras-Version ausgegeben, z.\,B.:
\begin{lstlisting}
=========================
Tensorflow Version 2.10.1
TensorFlow Version 2.17.0
Keras Version 3.5.0
=========================
\end{lstlisting}
TensorFlow lädt danach einmalig die benötigten Daten herunter und trainiert anschließend ein neuronales Netz. Dabei wird der Trainingsfortschritt angezeigt. Anschließend wird die Genauigkeit auf der Testmenge ausgegeben und Beispielbilder geplottet. Wenn das Testprogramm durchläuft, ist TensorFlow erfolgreich installiert.
......
import tensorflow as tf
import keras
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
from keras.utils import to_categorical
from keras.datasets import mnist
print('=========================')
print('TensorFlow Version', tf.__version__)
print('Keras Version ', keras.__version__)
print('=========================')
(XTrain, yTrain), (XTest, yTest) = mnist.load_data()
XTrain = XTrain.reshape(60000, 28, 28, 1)
XTest = XTest.reshape(10000, 28, 28, 1)
XTrain = XTrain / 255
XTest = XTest / 255
YTrain = to_categorical(yTrain, 10)
YTest = to_categorical(yTest, 10)
myANN = Sequential()
myANN.add(Conv2D(9, kernel_size=(3, 3), activation='relu', kernel_initializer='he_uniform', input_shape=(28, 28, 1)))
myANN.add(MaxPooling2D(2))
myANN.add(Flatten())
myANN.add(Dense(20, activation='tanh'))
myANN.add(Dense(10, activation='softmax'))
myANN.compile(loss='categorical_crossentropy', optimizer='nadam', metrics=['accuracy'])
myANN.fit(XTrain, YTrain, batch_size=500, epochs=5, verbose=True)
mse, acc = myANN.evaluate(XTest, YTest, verbose=False)
print('Test loss:', mse, 'Test accuracy:', acc)
import matplotlib.pyplot as plt
fig = plt.figure()
for i in range(9):
ax = fig.add_subplot(3, 3, i + 1)
ax.imshow(XTrain[i].squeeze(), cmap='gray', interpolation='none')
ax.set_title(yTrain[i])
plt.tight_layout()
plt.show()
# import and load datasets to start the initial download
from sklearn.datasets import fetch_california_housing
data = fetch_california_housing(as_frame=True)
from keras.applications.vgg16 import VGG16
model = VGG16(weights='imagenet', include_top=True)
No preview for this file type
......@@ -51,7 +51,7 @@
\usepackage[color=blue, author={Christof Kaufmann}]{attachfile2} % load after hyperref to avoid option clash from unicode=true
\title{Installation of Python via Miniforge for Linux}
\date{December 2023}
\date{August 2024}
\author{Christof Kaufmann}
% one infinite page, https://tex.stackexchange.com/a/19241/115883
......@@ -119,11 +119,12 @@ Now we are ready to install the packages we need.
\section{Packages}
Let's create a new environment called \textit{weai} and add the packages we need to it.
\textit{For GPU support replace \lstinline|tensorflow| by \lstinline|tensorflow-gpu=2.10| in the command below. This requires a recent propriatary NVIDIA driver installed via \lstinline|apt|, e.\,g.\ for Ubuntu \lstinline|nvidia-driver-510| or similar should be enough. For Debian \lstinline|nvidia-driver| might work (requires \lstinline|contrib| and \lstinline|non-free| in \lstinline|sources.list|).}
\textit{For GPU support replace \lstinline|'tensorflow<2.16'| by \lstinline|'tensorflow-gpu=2.10'| in the command below. This requires a recent propriatary NVIDIA driver installed via \lstinline|apt|, e.\,g.\ for Ubuntu \lstinline|nvidia-driver-510| or similar should be enough. For Debian \lstinline|nvidia-driver| might work (requires \lstinline|contrib| and \lstinline|non-free| in \lstinline|sources.list|).}
\begin{lstlisting}[gobble=2]
mamba create -n weai python=3.10 tensorflow spyder jupyter ipympl \
mamba create -n weai python=3.10 'tensorflow<2.16' spyder jupyter \
matplotlib seaborn tqdm mypy scikit-learn \
pandas openpyxl odfpy pyarrow notebook
pandas openpyxl odfpy pyarrow notebook \
optuna plotly ipympl
\end{lstlisting}
You will get a list of packages and can confirm with \keyenter. Installation takes a while. Let's change into the \textit{weai} environment and start spyder
\begin{lstlisting}[gobble=2]
......@@ -143,7 +144,7 @@ The Spyder window opens now. Open the test script \texttt{mnistKeras.py} (\texta
The test script will output the TensorFlow version, e.\,g.:
\begin{lstlisting}
=========================
Tensorflow Version 2.10.0
TensorFlow Version 2.10.0
=========================
\end{lstlisting}
Then TensorFlow will download the required data set once and train a neural network. The progress will be printed in the console. Finally the accuracy on the test set will be shown and some sample images will be plotted in the \textit{Plots} pane. This means Python and TensorFlow have been installed successfully.
......
No preview for this file type
......@@ -51,7 +51,7 @@
\usepackage[color=blue, author={Christof Kaufmann}]{attachfile2} % load after hyperref to avoid option clash from unicode=true
\title{Installation of Python via Miniforge for Windows}
\date{December 2023}
\date{August 2024}
\author{Christof Kaufmann}
% one infinite page, https://tex.stackexchange.com/a/19241/115883
......@@ -92,7 +92,7 @@ and install Miniforge. We recommend to leave the default settings especially to
\begin{minipage}{0.37\linewidth}
\includegraphics[width=\linewidth]{images/mambaforge-start-menu-prompt}
\end{minipage}%
\begin{lstlisting}[gobble=2]
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*
\end{lstlisting}
Now we are ready to install the packages we need.
......@@ -104,25 +104,25 @@ Now we are ready to install the packages we need.
Let's create a new environment called \textit{weai} and add the packages we need to it (copy \& paste black text lines):
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*mamba create -n weai python=3.9 astunparse matplotlib ^
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*mamba create -n weai python=3.10 astunparse matplotlib ^
ipympl mypy jupyter notebook spyder ^
scikit-learn seaborn openpyxl odfpy ^
pyarrow pandas
pyarrow pandas optuna plotly
\end{lstlisting}
You will get a list of packages and can confirm with \keyenter. Installation takes a while. Since \lstinline|tensorflow| is not yet available for Windows on \texttt{conda-forge}, we need to install it from \textit{PyPI} using \lstinline|pip| into the \textit{weai} environment:
\begin{lstlisting}[gobble=2]
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*mamba activate weai
#*\color{gray}(weai) C:\textbackslash Users\textbackslash john>*pip install tensorflow==2.10.1
\end{lstlisting}
If you have an NVIDIA GPU and want to activate support for it, install the following packages:
\begin{lstlisting}[gobble=2]
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(weai) C:\textbackslash Users\textbackslash john>*mamba install -c nvidia cudatoolkit cudnn cuda-nvcc
\end{lstlisting}
and optionally (not required for Spyder) also add the path to the corresponding libraries (e.\,g.\ \textit{cudnn64\_8.dll}) and tools (\texttt{ptxas.exe}) in your user environment variable \lstinline|Path|, for example:
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
C:\Users\john\miniforge\envs\ml\bin
C:\Users\john\miniforge\envs\ml\Library\bin
C:\Users\john\miniforge\envs\ml\Library\lib
C:\Users\john\miniforge\envs\weai\bin
C:\Users\john\miniforge\envs\weai\Library\bin
C:\Users\john\miniforge\envs\weai\Library\lib
\end{lstlisting}
......@@ -151,7 +151,7 @@ The Spyder window opens now. Open the test script \texttt{mnistKeras.py} (\texta
The test script will output the TensorFlow version, e.\,g.:
\begin{lstlisting}
=========================
Tensorflow Version 2.10.1
TensorFlow Version 2.10.1
=========================
\end{lstlisting}
Then TensorFlow will download the required data set once and train a neural network. The progress will be printed in the console. Finally the accuracy on the test set will be shown and some sample images will be plotted in the \textit{Plots} pane. This means Python and TensorFlow have been installed successfully.
......
No preview for this file type
......@@ -51,7 +51,7 @@
\usepackage[color=blue, author={Christof Kaufmann}]{attachfile2} % load after hyperref to avoid option clash from unicode=true
\title{Installation of Python via Miniforge for Windows}
\date{December 2023}
\date{August 2024}
\author{Christof Kaufmann}
% one infinite page, https://tex.stackexchange.com/a/19241/115883
......@@ -113,7 +113,7 @@ Now let's create a new environment called \textit{weai} and add the packages we
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*mamba create -n weai python=3.10 spyder jupyter notebook ^
ipympl mypy matplotlib seaborn ^
pandas pyarrow openpyxl odfpy ^
scikit-learn
scikit-learn optuna plotly
\end{lstlisting}
You will get a list of packages and can confirm with \keyenter. Installation takes a while. \textit{If it does not work because of SSL verification, try again from your home network.}
Now set up SSL verification again:
......