将pip
版本升级到10.0.0
后,如果与distutils安装的包存在版本冲突,则使用pip安装将失败:
Cannot uninstall '***'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
这可以用于PyYAML, pyOpenSSL, urllib3, chardet
等。
我尝试通过卸载相应的包来管理此问题,例如
python-yaml python-openssl python-urllib3 python-chardet
使用apt-get
(Ubuntu),然后使用pip
重新安装这些库
然而,正如apt-get
预期的那样,删除也会导致删除许多依赖的附加系统包,这似乎不是一个好的做法:
The following packages will be REMOVED:
apt-xapian-index cloud-init landscape-client-ui-install oneconf python-aptdaemon python-aptdaemon.gtk3widgets python-chardet python-cupshelpers python-debian python-openssl python-pip python-requests python-ubuntu-sso-client python-urllib3 python-yaml sessioninstaller software-center ssh-import-id system-config-printer-common system-config-printer-gnome system-config-printer-udev ubuntu-desktop ubuntu-release-upgrader-gtk ubuntu-sso-client ubuntu-sso-client-qt update-manager update-notifier update-notifier-common
我也不想将pip
降级到旧版本。
那么,使用pip处理冲突的distutils库的最佳实践是什么?
注:我本以为pip
是为了便于管理Python
库,但这一事件使它变得足够复杂。
目前没有回答
相关问题 更多 >
编程相关推荐