[英]Update/uninstall with Pip packages installed with apt (and vice versa)
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. 有许多资源可以比较和对比使用
apt-get
和pip
安装,更新和卸载python软件包的优缺点。
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
. 当我运行
pip list
,它列出了很多已安装的软件包,其中大多数在我的系统上是通过apt-get
而非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. 或者,
pip
能够管理apt-get
安装的软件包,但之后apt-get
就会混乱。 Is apt-get
able to manage a package installed by pip
? apt-get
能够管理pip
安装的软件包吗?
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 only pip install --user <package>
仅将软件包安装到用户目录中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.