开发手册 欢迎您!
软件开发者资料库

Python Anaconda conda 执行env create报错(RemoveError: 'requests' is a dependency of conda)解决方法

本文主要介绍Python Anaconda中执行conda env create -f命令时报错:RemoveError: 'requests' is a dependency of conda and cannot be removed fromconda's operating environment.的解决方法。

报错信息:

C:\Users\wonhero>conda env create -f python3.6-environment-windows.ymlCollecting package metadata: doneSolving environment: doneDownloading and Extracting Packagescertifi-2018.1.18    | 144 KB    | ############################################################################ | 100%mkl-2018.0.1         | 155.2 MB  | ############################################################################ | 100%pytz-2018.9          | 229 KB    | ############################################################################ | 100%icc_rt-2019.0.0      | 9.4 MB    | ############################################################################ | 100%icu-58.2             | 21.8 MB   | ############################################################################ | 100%pip-9.0.1            | 1.7 MB    | ############################################################################ | 100%xz-5.2.3             | 348 KB    | ############################################################################ | 100%sip-4.18.1           | 269 KB    | ############################################################################ | 100%libpng-1.6.36        | 1.3 MB    | ############################################################################ | 100%vc-14                | 985 B     | ############################################################################ | 100%numpy-1.14.0         | 3.7 MB    | ############################################################################ | 100%python-3.6.4         | 17.6 MB   | ############################################################################ | 100%jpeg-9c              | 314 KB    | ############################################################################ | 100%wheel-0.30.0         | 85 KB     | ############################################################################ | 100%wincertstore-0.2     | 13 KB     | ############################################################################ | 100%freetype-2.9.1       | 475 KB    | ############################################################################ | 100%scipy-1.0.0          | 13.0 MB   | ############################################################################ | 100%pyparsing-2.3.1      | 54 KB     | ############################################################################ | 100%kiwisolver-1.0.1     | 60 KB     | ############################################################################ | 100%qt-5.6.2             | 55.6 MB   | ############################################################################ | 100%python-dateutil-2.7. | 218 KB    | ############################################################################ | 100%vs2015_runtime-14.0. | 1.9 MB    | ############################################################################ | 100%ca-certificates-2017 | 489 KB    | ############################################################################ | 100%tk-8.6.7             | 3.5 MB    | ############################################################################ | 100%setuptools-38.4.0    | 540 KB    | ############################################################################ | 100%matplotlib-2.2.2     | 6.5 MB    | ############################################################################ | 100%six-1.12.0           | 21 KB     | ############################################################################ | 100%openssl-1.0.2n       | 5.4 MB    | ############################################################################ | 100%pyqt-5.6.0           | 4.5 MB    | ############################################################################ | 100%zlib-1.2.11          | 236 KB    | ############################################################################ | 100%tornado-5.1.1        | 665 KB    | ############################################################################ | 100%sqlite-3.22.0        | 907 KB    | ############################################################################ | 100%cycler-0.10.0        | 8 KB      | ############################################################################ | 100%Preparing transaction: doneVerifying transaction: failedRemoveError: 'requests' is a dependency of conda and cannot be removed fromconda's operating environment.RemoveError: 'setuptools' is a dependency of conda and cannot be removed fromconda's operating environment.

1、尝试更新conda解决

conda update conda

或者

sudo conda update conda

或者

conda update --all

或者

conda update --force conda 

或者

conda update --force-reinstall conda -y

win64可以尝试:

conda update --force conda 
conda install -c https://conda.anaconda.org/sdvillal openslide-python

2、通过卸载setuptools重新安装解决

1)卸载

pip uninstall setuptools

2)重新安装

conda install -c anaconda setuptools