如何查看我的程序使用的python-mosquitto包的版本?如何找到旧版本的python-mosquitto (版本0.15)并将其移除?
我在Raspberry Pi上运行,raspian
发布于 2013-11-14 19:01:02
0.15是随raspbian默认存储库提供的版本,因此我认为您是通过包管理器而不是pip安装的。
假设是这种情况,您可以使用sudo apt-get remove python-mosquitto删除它。您可以从蚊子存储库获取最新版本,您可以按如下方式添加:
# Add the gpg signing key for the repository
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
# Add the repository url and details to list of sources
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list然后更新并安装:
sudo apt-get update
sudo apt-get install python-mosquitto这也将为您提供其他蚊子组件的更新包。
您也可以使用pip:pip install mosquitto进行安装。
当前版本的mosquitto.py不包含版本号,但这已在未来版本中修复。
发布于 2013-11-14 18:30:20
如果您使用的是pip,请使用pip freeze | grep 'python-mosquitto'获取包版本,使用pip remove python-mosquitto将其删除。
https://stackoverflow.com/questions/19975234
复制相似问题