Conda: The following packages are missing from the target environment

二次信任 提交于 2021-01-19 23:18:08

问题


I'm trying to uninstall awscli:

conda list | grep aws
awscli                    1.18.78                  pypi_0    pypi

(base) % conda remove awscli
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are missing from the target environment:
  - awscli

But for some reason conda can't find package. What is proper way to uninstall awscli?


回答1:


Use Pip

The channel value of pypi indicates that this package was installed from PyPI using pip, and therefore - as suggested in @Sraw's comment - it needs to be removed with pip.

pip uninstall awscli

Additional Tips

Using pip in your base is discouraged. See "Using Pip in a Conda Environment".

The conda list command accepts a regex, so you don't need grep (which ends up filtering out the header information) to search specific packages. In this case conda list aws would have sufficed.



来源:https://stackoverflow.com/questions/62380444/conda-the-following-packages-are-missing-from-the-target-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!