AttributeError: module ‘pkg_resources‘ has no attribute ‘declare_namespace‘

博客内容讲述了作者在使用anaconda3和conda4.6.7版本时遇到nb_conda安装失败导致环境损坏的问题。经过检查发现setuptools版本58.0.0可能过高,不兼容现有环境。通过降级setuptools到36.0.2成功解决了问题。
部署运行你感兴趣的模型镜像

记录一个问题,anaconda3 conda 4.6.7版本安装nb_conda失败把原有环境弄坏了,出现了如标题所示错误。

猜测是依赖有点问题,先通过pipdeptree检查,发现所有依赖都满足。但是setuptools这个东西conda update conda过程中我手动更新过,虽然conda update conda更新失败了,但setuptools版本已经更新到58.0.0了,

- setuptools [required: >=36, installed: 58.0.0]

要求最高才36,怀疑是版本太新,老的没兼容。然后降级版本试了一把

pip uninstall setuptools

pip install setuptools==36.0.2

问题解决。

您可能感兴趣的与本文相关的镜像

Python3.8

Python3.8

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

qk@qk-Legion-Y7000P-IRH8:~$ rosdep /usr/bin/rosdep:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import load_entry_point Usage: rosdep [options] <command> <args> Commands: rosdep check <stacks-and-packages>... check if the dependencies of package(s) have been met. rosdep install <stacks-and-packages>... download and install the dependencies of a given package or packages. rosdep db generate the dependency database and print it to the console. rosdep init initialize rosdep sources in /etc/ros/rosdep. May require sudo. rosdep keys <stacks-and-packages>... list the rosdep keys that the packages depend on. rosdep resolve <rosdeps> resolve <rosdeps> to system dependencies rosdep search <searchstrings>... Search for a key in the rosdep database. Searches rosdep keys and system or ROS package names. The search is case-insensitive and all search strings have to match. Supports fuzzy-search if the Python module regex is installed. Uses the os name from the current system to filter the package results. You can override the os name with the --os option. Example: rosdep search pcl dev Output: Closest keys: libpcl-all-dev rosdep update update the local rosdep database based on the rosdep sources. rosdep what-needs <rosdeps>... print a list of packages that declare a rosdep on (at least one of) <rosdeps> rosdep where-defined <rosdeps>... print a list of yaml files that declare a rosdep on (at least one of) <rosdeps> rosdep fix-permissions Recursively change the permissions of the user's ros home directory. May require sudo. Can be useful to fix permissions after calling "rosdep update" with sudo accidentally. rosdep: error: Please enter a command qk@qk-Legion-Y7000P-IRH8:~$
09-10
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值