Skip to content

Commit 9f93bc6

Browse files
committed
moved to new numpy version
1 parent fb4f6f5 commit 9f93bc6

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎text/main/ecosystem/packages/requirementsFiles/requirementsFiles.tex‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%
55
\gitLoad{lst:packages:requirementstxt}{\programmingWithPythonCodeRepo}{packages/requirements.txt}{}%
66
\listingTxt{packages:requirementstxt}{%
7-
A requirements file demanding that version~\textil{1.26.4} of \numpy\ be installed.}%
7+
A requirements file demanding that version~\textil{2.5.2} of \numpy\ be installed.}%
88
%
99
\gitLoad{lst:packages:numpy_user_venv_req_sh}{\programmingWithPythonCodeRepo}{packages/numpy_user_venv_req.sh}{}%
1010
\gitExecBash{packages:numpy_user_venv_req_sh}{\programmingWithPythonCodeRepo}{packages}{numpy_user_venv_req.sh}
@@ -27,12 +27,12 @@
2727
\end{sloppypar}%
2828
%
2929
\Cref{lst:packages:requirementstxt} gives a trivial example of such a file.
30-
It contains the line \textil{numpy==1.26.4}.
31-
This means that \numpy\ of exactly the version~1.26.4 is required for our application.
32-
Had we written \textil{numpy>=1.26.4}, then a larger version of \numpy\ would also have been OK.
30+
It contains the line \textil{numpy==2.5.2}.
31+
This means that \numpy\ of exactly the version~2.5.2 is required for our application.
32+
Had we written \textil{numpy>=2.5.2}, then a larger version of \numpy\ would also have been OK.
3333
The other operators, \textil{>}, \textil{<}, and~\textil{<=} can be used as well and have their natural corresponding meaning.
34-
If we had wanted, we could have written \textil{matplotlib} in the second line of our \textil{requirements.txt} file, which would then have meant that, besides \numpy\ of version~\textil{1.26.4}, the package \matplotlib\ is needed as well.
35-
Writing only \textil{matplotlib} would be interpreted as \inQuotes{find the highest version of \matplotlib\ that is compatible with \numpy\ version~1.26.4.}
34+
If we had wanted, we could have written \textil{matplotlib} in the second line of our \textil{requirements.txt} file, which would then have meant that, besides \numpy\ of version~\textil{2.5.2}, the package \matplotlib\ is needed as well.
35+
Writing only \textil{matplotlib} would be interpreted as \inQuotes{find the highest version of \matplotlib\ that is compatible with \numpy\ version~2.5.2.}
3636
But we only need one package, \numpy, so our file just has a single line.
3737

3838
In \cref{lst:packages:numpy_user_venv_req_sh}, we present a version of the script that we used to set up a virtual environment and run our two-line \numpy\ program under \ubuntu\ \linux~(see \cref{lst:packages:numpy_user_venv_req_sh}.)

‎text/main/ecosystem/packages/venvAndPycharm/venvAndPycharm.tex‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
\floatSep%
3131
%
3232
\subfloat[][%
33-
It contains the one line \textil{numpy==1.26.4}, which means that our project requires \numpy\ in version~1.26.4.%
33+
It contains the one line \textil{numpy==2.5.2}, which means that our project requires \numpy\ in version~2.5.2.%
3434
\label{fig:venvPycharm4}%
3535
]{\tightbox{\includegraphics[width=0.48\linewidth]{\currentDir/venvPycharm4}}}%
3636
%
@@ -99,7 +99,7 @@
9999
Notice that you could as well create an empty project and copy the files there.
100100

101101
We click on \textil{requirements.txt} and it opens in~\cref{fig:venvPycharm4}.
102-
Indeed, the file prescribes a single requirement, \numpy\ in version~1.26.4.
102+
Indeed, the file prescribes a single requirement, \numpy\ in version~2.5.2.
103103

104104
When we click on the file \programUrl{packages:numpy_user} to open it in~\cref{fig:venvPycharm5}, we notice a yellow bar at the top of the file's contents.
105105
This bar tells us that the required package \numpy\ is missing.
@@ -110,7 +110,7 @@
110110
Either way, we accept the choice to install the requirement.
111111

112112
In \cref{fig:venvPycharm6}, we are informed that the installation was successful.
113-
The small overlay also tells us that \numpy\ was installed in version~1.26.4, as prescribed by the \textil{requirements.txt} file.
113+
The small overlay also tells us that \numpy\ was installed in version~2.5.2, as prescribed by the \textil{requirements.txt} file.
114114
At the time of this writing, \numpy\ is already out at version~2.2.1, which would have been used if we had just installed it without version specification.
115115
So this confirms that, indeed, our \textil{requirements.txt} is used.
116116
We also can see that the red underline under \pythonilIdx{numpy} that was present in \cref{fig:venvPycharm5} is now gone in \cref{fig:venvPycharm6}, because now the package and corresponding modules can be loaded without error.

0 commit comments

Comments
 (0)