Docs Home → Develop Applications → Python Drivers → PyMongo
Download and Install
Create a Project Directory
In your shell, run the following command to create a
directory called pymongo-quickstart
for this project:
mkdir pymongo-quickstart
Run the following command to navigate into the project directory:
cd pymongo-quickstart
Run the following command to create a file to contain your application:
touch quickstart.py
Install PyMongo
Run the following commands in your shell to create and activate a virtual environment in which to install the driver:
python3 -m venv venv source venv/bin/activate
With the virtual environment activated, run the following command to install the current version of PyMongo:
python3 -m pip install pymongo
After you complete these steps, you have a new project directory and the driver dependencies installed.
Note
If you run into issues on this step, ask for help in the MongoDB Community Forums or submit feedback by using the Rate this page tab on the right or bottom right side of this page.