Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
habrok:software_environment:python:loading_python [2026/05/04 11:09] – [Libraries within the Python module] pedrohabrok:software_environment:python:loading_python [2026/10/23 08:24] (current) – Fix link pedro
Line 38: Line 38:
    
 The Python ecosystem is extremely varied, with a lot of libraries for all sorts of purposes, from web servers, to numerical computing, and everything in between and to the sides. The Python ecosystem is extremely varied, with a lot of libraries for all sorts of purposes, from web servers, to numerical computing, and everything in between and to the sides.
-  + 
-As a Python user, you would usually install these libraries with ''pip'', the Python Package Installer. You can still do that on Hábrók, as we have detailed in the [[habrok_internal:drafts:python:environments:pip_venv|pip + venv]] page, but this is not always the best way, because ''pip'' doesn't optimize the libraries for the particular machines they would be running on. In an HPC environment, performance is key, especially for numerical libraries.+As a Python user, you would usually install these libraries with ''pip'', the Python Package Installer. You can still do that on Hábrók, as we have detailed in the [[environments#pip_venv|pip + venv]] section, but this is not always the best way, because ''pip'' doesn't optimize the libraries for the particular machines they would be running on. In an HPC environment, performance is key, especially for numerical libraries.
    
 The Python module itself comes with a host of libraries already installed (optimally), so that is the first place to look for a specific library. You can check what is included with: The Python module itself comes with a host of libraries already installed (optimally), so that is the first place to look for a specific library. You can check what is included with:
Line 113: Line 113:
 </code> </code>
  
-Notice that even though we previously loaded ''Python/3.13.5-GCCcore-14.3.0'', loading TensorFlow has replaced it with ''Python/3.10.4-GCCcore-11.3.0''. This is expected behaviour since TensorFlow was built against a specific Python version and the module system automatically loads the compatible version. This is a general rule: when you load a library module, it will bring in the Python version it was built against, regardless of what you loaded before. It is therefore important to be aware of which Python version is actually active after loading all your modules, which you can always check with ''python3 --version''.+Notice that even though we previously loaded ''Python/3.13.5-GCCcore-14.3.0'', loading TensorFlow has replaced it with ''Python/3.10.4-GCCcore-11.3.0''. This is expected behaviour since TensorFlow was built against a specific Python version and the module system automatically loads the compatible version. This is a general rule: when you load a library module, it will bring in the Python version it was built against, regardless of what you loaded before. It is therefore important to be aware of which Python version is actually active after loading all your modules, which you can always check with ''python3 %%--%%version''.
 <code> <code>
 The following have been reloaded with a version change: The following have been reloaded with a version change: