- Some useful modules
- Installing modules
- Testing a module
Some useful modules
Installing modules with pip
pip install markdown
Installing modules with setup scripts
Installing modules manually using .pth files
Create a simple text file in a code editor, containing the path to the root folder where the module lives.
The easiest way to get the correct path is by dragging the folder from Finder into a code editor or Terminal – so you’ll get the path without having to type it.
Save this file with the name of the module and the extension
.pth in the
site-packages folder for the desired Python(s). For example:
And that’s it.
This method creates a reference to the folder in which the module lives.
Testing a module
To see if a module is installed, just try to import it in the environment you wish to work in:
If no error is raised, you’re good to go.
- include other useful external packages
- expand installation instructions
- inlude markdown, grapefruit, etc. examples?