cc_staff
284
edits
(Marked this version for translation) |
(Rework the Availalable wheels section based on the 2.0 version of the script.) |
||
Line 190: | Line 190: | ||
By default, it will: | By default, it will: | ||
* only show you the '''latest version''' of a specific package (unless versions are given); | * only show you the '''latest version''' of a specific package (unless versions are given); | ||
* only show you versions that are compatible with the python module (if one loaded), otherwise all python versions will be shown; | * only show you versions that are compatible with the python module (if one loaded) or virtual environment (if activated), otherwise all python versions will be shown; | ||
* only show you versions that are compatible with the CPU architecture that you are currently running on. | * only show you versions that are compatible with the CPU architecture that you are currently running on. | ||
==== Names ==== | |||
To list wheels containing | To list wheels containing <tt>cdf</tt> (case insensitive) in its name: | ||
{{Command|avail_wheels | {{Command | ||
name | |avail_wheels "*cdf*" | ||
------- --------- ------- ------- | |result= | ||
netCDF4 | name version python arch | ||
-------- --------- -------- ------- | |||
h5netcdf 0.7.4 py2,py3 generic | |||
netCDF4 1.5.8 cp39 avx2 | |||
netCDF4 1.5.8 cp38 avx2 | |||
netCDF4 1.5.8 cp310 avx2 | |||
}} | }} | ||
Or an exact name: | |||
Or | {{Command | ||
{{Command|avail_wheels | |avail_wheels numpy | ||
name | |result= | ||
name version python arch | |||
------ --------- -------- ------- | |||
numpy 1.23.0 cp39 generic | |||
numpy 1.23.0 cp38 generic | |||
numpy 1.23.0 cp310 generic | |||
}} | }} | ||
==== Version ==== | |||
Or | To list a specific version, one can use the same format as with `pip`: | ||
{{Command|avail_wheels --name | {{Command | ||
name | |avail_wheels numpy{{=}}{{=}}1.23 | ||
------- --------- ------- -------- ------ | |result= | ||
netCDF4 | name version python arch | ||
netCDF4 | ------ --------- -------- ------- | ||
netCDF4 | numpy 1.23.0 cp39 generic | ||
numpy 1.23.0 cp38 generic | |||
numpy 1.23.0 cp310 generic | |||
}} | |||
Or use the long option: | |||
{{Command | |||
|avail_wheels numpy --version 1.23 | |||
|result= | |||
name version python arch | |||
------ --------- -------- ------- | |||
numpy 1.23.0 cp39 generic | |||
numpy 1.23.0 cp38 generic | |||
numpy 1.23.0 cp310 generic | |||
}} | |||
With the <tt>pip</tt> format, one can use different operators : <tt>==</tt>, <tt><</tt>, <tt>></tt>, <tt>~=</tt>, <tt><=</tt>,<tt>>=</tt>, <tt>!=</tt>. For instance, to list inferior versions: | |||
{{Command | |||
|avail_wheels 'numpy<1.23' | |||
|result= | |||
name version python arch | |||
------ --------- -------- ------- | |||
numpy 1.22.2 cp39 generic | |||
numpy 1.22.2 cp38 generic | |||
numpy 1.22.2 cp310 generic | |||
}} | |||
And to list all available versions: | |||
{{Command | |||
|avail_wheels "*cdf*" --all-version | |||
|result= | |||
name version python arch | |||
-------- --------- -------- ------- | |||
h5netcdf 0.7.4 py2,py3 generic | |||
netCDF4 1.5.8 cp39 avx2 | |||
netCDF4 1.5.8 cp38 avx2 | |||
netCDF4 1.5.8 cp310 avx2 | |||
netCDF4 1.5.6 cp38 avx2 | |||
netCDF4 1.5.6 cp37 avx2 | |||
netCDF4 1.5.4 cp38 avx2 | |||
netCDF4 1.5.4 cp37 avx2 | |||
netCDF4 1.5.4 cp36 avx2 | |||
}} | }} | ||
==== Python ==== | |||
One can list a specific version of Python: | |||
{{Command|avail_wheels | {{Command | ||
name | |avail_wheels 'numpy<1.23' --python 3.9 | ||
|result= | |||
name version python arch | |||
------ --------- -------- ------- | |||
numpy 1.22.2 cp39 generic | |||
}} | }} | ||
The ''python'' column tell us for which python version the wheel is available, where <tt> | The ''python'' column tell us for which python version the wheel is available, where <tt>cp39</tt> stands for <tt>cpython 3.9</tt>. | ||
==== | ==== Requirements file ==== | ||
One can list available wheels based on a <tt>requirements.txt</tt> file with: | |||
{{Command | |||
|avail_wheels -r requirements.txt | |||
|result= | |||
name version python arch | |||
--------- --------- -------- ------- | |||
packaging 21.3 py3 generic | |||
tabulate 0.8.10 py3 generic | |||
}} | |||
And display wheels that are not available: | |||
{{Command | |||
|avail_wheels -r requirements.txt --not-available | |||
|result= | |||
name version python arch | |||
--------- --------- -------- ------- | |||
packaging 21.3 py3 generic | |||
pip | |||
tabulate 0.8.10 py3 generic | |||
}} | |||
=== Pre-downloading packages === <!--T:61--> | === Pre-downloading packages === <!--T:61--> |