Skip to content
Snippets Groups Projects
Commit 3c4f6194 authored by Christof Kaufmann's avatar Christof Kaufmann
Browse files

Use correct python interpreter paths for VS Code

parent e90f48b2
Branches
No related tags found
No related merge requests found
No preview for this file type
......@@ -209,16 +209,15 @@ 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, wählen Sie den installierten Python-Interpreter (\lstinline|ml|) aus und klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster:
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/mambaforge/envs/ml/bin/python}. Klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster (Schritt 6):
\vspace{-1em}
\noindent
\includegraphics[width=\linewidth]{images/vscode-python-extension}
\includegraphics[width=\linewidth]{images/vscode-python-extension-linux}
\vspace{-1.5em}
\noindent
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{/home/john/.local/opt/mambaforge/bin/python}. Spätestens dann nach Schritt 6 (Rechtsklick ins Editor-Fenster)
klicken Sie im Kontext-Menü auf \textit{Run in Interactive Window}\textit{Run Current File in Interactive Window}:
Klicken Sie nun im Kontext-Menü auf \textit{Run in Interactive Window}\textit{Run Current File in Interactive Window}:
\vspace{-0.5em}
\begin{center}
\includegraphics[width=0.95\linewidth]{images/vscode-python-run-interactive}
......
No preview for this file type
......@@ -47,7 +47,7 @@
}
\newcommand{\keyshift}{\keystroke{Shift\,\tikz [baseline=-1mm, rounded corners=0pt] \node [draw, single arrow, single arrow head extend=0.1mm, rotate=90, inner sep=0.00mm, minimum size=2mm] {};}}
\usepackage[colorlinks=true,urlcolor=blue,unicode=true]{hyperref}
\usepackage[colorlinks=true,urlcolor=blue,unicode=true,pdfusetitle]{hyperref}
\usepackage[color=blue, author={Christof Kaufmann}]{attachfile2} % load after hyperref to avoid option clash from unicode=true
......@@ -193,15 +193,15 @@ 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, wählen Sie den installierten Python-Interpreter (\lstinline|ml|) aus und klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster:
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|~\mambaforge\envs\ml\python.exe|. Klicken Sie anschließend mit der rechten Maustaste irgendwo in das Editor-Fenster:
\vspace{-1em}
\noindent
\includegraphics[width=\linewidth]{images/vscode-python-extension}
\includegraphics[width=\linewidth]{images/vscode-python-extension-win}
\vspace{-1.5em}
\noindent
Im Kontext-Menü klicken Sie auf \textit{Run in Interactive Window}\textit{Run Current File in Interactive Window}:
Klicken Sie nun im Kontext-Menü auf \textit{Run in Interactive Window}\textit{Run Current File in Interactive Window}:
\vspace{-0.5em}
\begin{center}
\includegraphics[width=0.95\linewidth]{images/vscode-python-run-interactive}
......
images/vscode-python-extension-win.png

212 KiB

No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment