Why Is `-atplotlib` Listed in `pip list` After a Typo During Installation?

Mary-Kate Olsen
Release: 2024-11-20 17:59:25
Original
755 people have browsed it

Why Is `-atplotlib` Listed in `pip list` After a Typo During Installation?

Pip: Removing Incorrectly Installed Packages with Leading Dash (-pkgname)

After executing pip freeze, users may encounter the warning: "WARNING: Could not parse requirement: -atplotlib." Subsequently, running pip list reveals the existence of an odd "package" named "-atplotlib." Attempts to uninstall it using pip uninstall -atplotlib result in the error: "No such option: -a."

Cause of the Issue:

The issue stems from a typo during the installation or upgrade of matplotlib, leading to the incorrect installation of "-atplotlib."

Solution: Manually Deleting Directories

To resolve the issue, it is safe to manually delete the following directories:

  • C:UsersnameAnaconda3Libsite-packages~atplotlib
  • C:UsersnameAnaconda3Libsite-packages~atplotlib-3.0.3-py3.7.egg-info

Explanation:

According to the documentation, Pip now renames previously installed packages to an un-importable name during uninstallation. Only after successful confirmation of all necessary actions, including upgrades and installations, does it delete the renamed directories. The directories remain if the process is interrupted or fails. In this case, the directories should be safe to delete manually.

The above is the detailed content of Why Is `-atplotlib` Listed in `pip list` After a Typo During Installation?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template