Hark, a Python Installation,

Skip to content

This doth be a machine-wrought text which may contain errors!

Mac Installation

Shouldst thou be upon a Mac, thou shouldst already possess Python installed. This mayst thou verify by opening the “Terminal” programme, thereafter mayst thou write python3 -V (a great V for version) within the terminal. Then shall it display the version which thou hast of Python. To test if all doth function, thou mayst proceed further.

Viktig!

‘Tis possible a message may appear, saying “No developer tools found.” Should this befall thee, suffer thy machine to install said tools. When this is done, close the terminal and open a fresh one, and write python3 -V once more to ascertain if Python hath been installed.

Windows Installation

Upon Windows, Python is not installed of its own accord, thus must we download it and install it ourselves Python download.. After the download, ‘tis but to run the installation file and follow the instructions.

Før du installerer! ☝🤓

Thou MUST mark (✅) “Add Python to PATH” that it may function. Shouldst thou err in this, the easiest course is to uninstall Python and install it anew. ‘Tis perchance also of import to mark “Use admin privileges when installing py.exe”
Python installer bilde

Python Extension i VS Code

‘Tis most heartily counselled that ye install the “Python” extension within VS Code. It shall bestow upon ye hints concerning functions and more within the realm of Python.

A Simple Test Programme

After installation, thou mayest open VS Code.

  • Go to File -> Open Folder.
  • Create a folder in, forsooth, “Documents” which shall be named “Python”.
  • Create a file which be named hello.py.
  • Write the following programme which doth print a fair and little message:

print("Hallo, 1IM!")
# Hilsen til 1IM! -> Greeting unto 1IM!

Hva skjer i denne koden?

print is a built-in function in Python that doth output text unto the terminal window. Perchance thou dost not yet know what a function is, but the most important thing to know is that parentheses must follow the function’s name. Text in Python must be betwixt quotation marks ("), and that which doth lie between them shall be output.