Python is a scripting language.

Scripts are any *.py file executed by an interpreter (like Python’s IDLE). Package is a collection of modules/scripts installed by a package manager.

Python in Windows

PATH is an environment variable in Windows. It basically tells the commandline what folders to look in when attempting to find a file. If you didn’t add Python to PATH then you would call it from the commandline like this:


Whereas if you add it to PATH, you can do this:

  • Open command prompt
  • Enable Python environment (ensure Python installed beforehand): python
  • This will show up: >>>

Sample code with Python in Command Prompt:

>>> print(‘Hello World!’)
Hello World!
>>> 2 + 57

To exit Python environment: quit() or exit() or ctrl+z (and enter)

To run *.py (e.g., 
In Command Prompt,
:: Exit Python environment (if in it)
:: Go to directory of
:: Type and press enter: python
:: Open in IDLE
:: Run (press F5)

To find where python is installed, execute in cmd: where python

# save as
def add(x, z):
result = x + z
return result
# save as
import xz
# when run , output will be 7

Check python version: python –version

If version still shows the previous, update to latest @ PATH by Moving Up.

Python’s Packages


PIP is Python’s package manager.

# Check PIP version
pip --version

# Download and install packages like TensorFlow and camelcase
pip install <packagename>

# Using package
import camelcase
c = camelcase.CamelCase()


# Useful packages list
pip install jupyterlab # jupyterlab; launch with: jupyter-lab
pip install notebook # classic Jupyter notebook; launch with: jupyter notebook

Python Repository


venv / pyvenvsingle Python version
pyenvmultiple Python version (deprecated @ Python 3.8+ and replaced with venv)
pyenv-virtualenvPython 2 inclusive


$ python3 -m venv directory-name-to-create
# e.g. python3.6 -m venv example-three-six
$ source name-given/bin/activate
$ deactivate
$ rm -r name-given

When the environment is active, any packages can be installed to it via pip as normal (by default, the newly created environment will not include any packages).

--- :: Skyferia Tech's Related Posts :: ---