Python packages add reusable functionality. PyCharm can install them into the project interpreter without requiring you to manage global Python files.
Understanding the Concept
Open Settings > Python > Interpreter and inspect the package list for the selected environment. Use its package installation action to search for a package and install a compatible version. For a CLI alternative, use python -m pip install package_name in the environment. Install only trusted packages you actually need; downloading a library also brings its dependencies and sometimes executable tools. The free PyCharm core can manage local packages.
When and Why You Would Use This
For a safe early exercise, first list the packages already installed rather than adding unnecessary dependencies. Later, when a guide needs a third-party library, verify its Python support and license.
Practical Example
python -m pip list
python -m pip show pip
python -m pip check
Understanding the Example
Run these commands in the project terminal. list displays installed distributions, show pip provides details about pip, and check reports dependency conflicts. The exact output depends on your environment.
Try It Yourself
Inspect the project package list and record what packages are already present. Do not add anything just for this exercise.
Common Beginner Mistakes
- Installing packages into the system interpreter instead of the PyCharm project environment.
- Assuming a package is part of the standard library because its name sounds familiar.
- Installing unknown packages without checking source, purpose, or compatibility.
Key Takeaways
- Packages extend Python with third-party functionality.
- Package installation targets a particular interpreter environment.
- Use package-management tools deliberately and verify dependencies.