packaging.python.org icon indicating copy to clipboard operation
packaging.python.org copied to clipboard

New tutorials: write section to walk through installing and uninstalling a package

Open ddbeck opened this issue 10 years ago • 5 comments

(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/-U switch), 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!

ddbeck avatar Dec 08 '15 19:12 ddbeck

I will be working on this

souravsingh avatar Dec 09 '15 04:12 souravsingh

I believe this covers most of the sections in the tutorial.Do we need to add on this section or is this fine?

souravsingh avatar Dec 20 '15 17:12 souravsingh

@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.

ddbeck avatar Dec 21 '15 12:12 ddbeck

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.

jeanas avatar Jan 16 '24 18:01 jeanas

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.

sinoroc avatar Jan 16 '24 18:01 sinoroc