packaging.python.org
packaging.python.org copied to clipboard
New tutorials: write section to walk through installing and uninstalling a package
(For more information about this issue, please see #194).
We need a short section to follow the package sources section (see #200) (i.e., as its own file). It should satisfy the following goals:
- walk through installing a package with pip
- verifying that the package is installed (e.g., with an import statement or running a script)
- upgrade with the (
--upgrade/-Uswitch), even if it doesn't actually do anything - walk through uninstalling a package (again, with pip)
This should be a largely step-by-step process, explaining each step in turn.
When opening pull requests for this issue, please submit to the develop branch. If you have questions that concern contributing more generally, please use issue #194. Otherwise, feel free to comment with questions or feedback. Thanks!
I will be working on this
I believe this covers most of the sections in the tutorial.Do we need to add on this section or is this fine?
@souravsingh You're right that this section is going to overlap the other section. But that other section is a reference, so it covers a lot of things that we don't need to cover here (e.g., installing a prerelease or setuptools extras). Plus, the goal for the tutorials is to give the reader something to practice on (inviting them to do the steps themselves), so that they can build experience and confidence with the tools and practices.
I was going to say that this is all covered by the Installing packages tutorial and the Install packages in a virtual environment using pip and venv guide, but curiously, these don't mention how to uninstall packages.
Very likely we will then have to explain how to uninstall a package and all its now "orphan" dependencies... which is tricky. Even with advanced development workflow tools (hatch, pdm, poetry, etc.) it is not always straightforward, for example, when foregoing the CLI and directly editing out the dependency from pyproject.toml manually.
Me, I just nuke the virtual environment and restart from scratch, but I am sure it will not be considered a good enough solution.