Modules: Difference between revisions

Jump to navigation Jump to search
135 bytes added ,  3 years ago
Marked this version for translation
(clarify and shorten)
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


<!--T:1-->
In computing, a module is a unit of software that is designed to be independent, interchangeable, and contain everything necessary to provide some desired functionality.
In computing, a module is a unit of software that is designed to be independent, interchangeable, and contain everything necessary to provide some desired functionality.
<ref>[https://en.wikipedia.org/wiki/Modular_programming Wikipedia, "Modular programming"]</ref>
<ref>[https://en.wikipedia.org/wiki/Modular_programming Wikipedia, "Modular programming"]</ref>
Line 7: Line 8:
This page describes a few types of modules and cites their corresponding documentation pages.  
This page describes a few types of modules and cites their corresponding documentation pages.  


== Disambiguation ==
== Disambiguation == <!--T:2-->


=== Lmod modules ===
=== Lmod modules === <!--T:3-->


<!--T:4-->
Also called "environment modules", Lmod modules are used to alter your (shell) environment so as to enable you to use a particular software package,
Also called "environment modules", Lmod modules are used to alter your (shell) environment so as to enable you to use a particular software package,
or to use a non-default version of certain common software packages such as compilers.  See [[Using modules]].
or to use a non-default version of certain common software packages such as compilers.  See [[Using modules]].


=== Python modules ===
=== Python modules === <!--T:5-->


<!--T:6-->
In Python, a module is file of code (usually Python code) which can be loaded with the <code>import ...</code> or <code>from ... import ...</code> statements to provide functionality.  A Python package is a collection of Python modules; the terms "package" and "module" are frequently interchanged in casual use.
In Python, a module is file of code (usually Python code) which can be loaded with the <code>import ...</code> or <code>from ... import ...</code> statements to provide functionality.  A Python package is a collection of Python modules; the terms "package" and "module" are frequently interchanged in casual use.
<ref>[https://www.tutorialspoint.com/What-is-the-difference-between-a-python-module-and-a-python-package Tutorialspoint.com, "What is the difference between a python module and a python package?"]</ref>
<ref>[https://www.tutorialspoint.com/What-is-the-difference-between-a-python-module-and-a-python-package Tutorialspoint.com, "What is the difference between a python module and a python package?"]</ref>


<!--T:7-->
Certain frequently-used Python modules such as "Numpy" can be imported if you first load the <code>scipy-stack</code> Lmod module at the shell level.
Certain frequently-used Python modules such as "Numpy" can be imported if you first load the <code>scipy-stack</code> Lmod module at the shell level.
See [[Python#SciPy_stack|SciPy stack]] for details.
See [[Python#SciPy_stack|SciPy stack]] for details.


<!--T:8-->
Compute Canada maintains a large collection of [[Python#Available_wheels|Python "wheels"]].
Compute Canada maintains a large collection of [[Python#Available_wheels|Python "wheels"]].
These are modules which are pre-compiled to be compatible with the [[Standard software environments]].
These are modules which are pre-compiled to be compatible with the [[Standard software environments]].
Before importing modules from the Compute Canada wheels, you should create a [[Python#Creating_and_using_a_virtual_environment|virtual environment]].   
Before importing modules from the Compute Canada wheels, you should create a [[Python#Creating_and_using_a_virtual_environment|virtual environment]].   


<!--T:9-->
Python modules which are in neither the <code>scipy-stack</code> Lmod module or our wheels collection can be installed from the internet
Python modules which are in neither the <code>scipy-stack</code> Lmod module or our wheels collection can be installed from the internet
as described at [[Installing packages|Python#Installing_packages]].
as described at [[Installing packages|Python#Installing_packages]].


== Other related topics ==
== Other related topics == <!--T:10-->


<!--T:11-->
The main [[Available software]] page is a good starting point. Other related pages:
The main [[Available software]] page is a good starting point. Other related pages:
* [[Standard software environments]]: as of April 1st, 2021, <code>StdEnv/2020</code> is the default collection of Lmod modules
* [[Standard software environments]]: as of April 1st, 2021, <code>StdEnv/2020</code> is the default collection of Lmod modules
Line 37: Line 44:
* [[:Category:Software|Category ''Software'']]: a list of different software pages in this wiki, including commercial or licensed software
* [[:Category:Software|Category ''Software'']]: a list of different software pages in this wiki, including commercial or licensed software


== Footnotes ==
== Footnotes == <!--T:12-->


</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu