<jupyter_start><jupyter_text>Installing and importing modules and libraries  Importing built-in modulesWhen you install Python, you get a ton of functionality right out of the box, without importing anything.You also get access to other code modules that come bundled in what's called the "[standard library](https://docs.python.org/3/library/)" -- but to use these bits of functionality, you need to _import_ them into your script.Let's import the `time` module from the standard library, then use its `sleep()` method to pause the script for however many seconds we specify.<jupyter_code>import time
time.sleep(2)<jupyter_output><empty_output><jupyter_text>Importing external librariesYou can also _install_ external Python libraries -- software written by people around the world to help Python developers accomplish different tasks. In this session, for instance, we're using [Jupyter notebooks](https://jupyter.org/) and the [`pandas`](https://pandas.pydata.org) data analysis library.To manage these dependencies, we're using a tool called [pipenv](https://docs.pipenv.org/basics/). This tool also manages our project's [_virtual environment_](https://realpython.com/python-virtual-environments-a-primer/) -- a way to isolate our project and its dependencies (`jupyter` and `pandas`) from other projects and their dependencies.Once we installed pipenv, we went to our computer's *terminal*, moved into the project directory that contains these files, and ran this command: `pipenv install jupyter pandas`.👉For more details on the *terminal* and starting a Python project from scratch, [see this notebook](Starting%20a%20new%20Python%20project%20from%20scratch.ipynb).Let's import pandas. When we import it, let's use the [`as`](https://docs.python.org/3/reference/simple_stmts.htmlthe-import-statement) keyword to refer to the library as `pd`, a convention that makes it quicker to type.<jupyter_code>import pandas as pd<jupyter_output><empty_output><jupyter_text>Importing local codeLet's pretend that you have a local Python file, `myfile.py`, that contains some things you'd like to import into this script.Surprise, you don't have to pretend! There *is* a file called `myfile.py` in this folder that contains some things we'd like to import into *this* script. Specifically, we'd like to import a dictionary called `codys_dog` that has some details about my dog Charlie.(This is Charlie:![charlie](../img/charlie.jpg "charlie"))<jupyter_code>from myfile import codys_dog
codys_dog<jupyter_output><empty_output>