There are a number of resources that compare and contrast the advantages and disadvantages of using apt-get
and pip
to install, update, and uninstall python packages.
What I cannot find is a resource that indicates what happens if something that is installed by one package manager is updated or uninstalled by the other.
When I run pip list
, it lists a lot of packages that are installed, most of which on my system were installed by apt-get
and not pip
.
So, are these two package managers able to manage packages installed by the other? Or, is pip
able to manage a package installed by apt-get
, but then apt-get
is messed up afterwards. Is apt-get
able to manage a package installed by pip
?
To use pip to uninstall a package locally in a virtual environment: Open a command or terminal window (depending on the operating system) cd into the project directory. pip uninstall <packagename>
Open a terminal window. To uninstall, or remove, a package use the command '$PIP uninstall <package-name>'.
Update a package: pip install --upgrade To update installed packages to the latest version, run pip install with the --upgrade or -U option.
Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: Pure distutils packages installed with python setup.py install , which leave behind no metadata to determine what files were installed.
I would recommend to try and avoid using two (or more) package managers at the same time. It's not very likely that they will cooperate correctly and smoothly.
If possible, pick one of them and use it. Combine them only if you really need to. Usually you don't.
There are ways of avoiding conflicts such as
pip install --user <package>
which installs the package into the user's directory onlyIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With