当我尝试在conda中安装scikit-learn时,我收到以下错误
$ conda install scikit-learn
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment
/Users/xlnwel/anaconda/envs/ai:
The following NEW packages will be INSTALLED:
scikit-learn: 0.19.0-np113py36_0
scipy: 0.19.1-np113py36_0
Proceed ([y]/n)? y
ERROR conda.core.link:_execute_actions(335): An error occurred while installing package 'defaults::scipy-0.19.1-np113py36_0'.
FileExistsError(17, 'File exists')
Attempting to roll back.
FileExistsError(17, 'File exists')
我认为可能因为scipy已经存在,所以我试图删除scipy,仍然收到错误:
$ conda remove scipy
Fetching package metadata ...........
Solving package specifications: .
PackageNotFoundError: Package not found: Conda could not find '
我现在能做什么? 我正在使用Mac。
答案 0 :(得分:1)
如果已经满足依赖关系,请尝试安装scikit-learn
包忽略scipy
包:
conda install --no-deps scikit-learn
答案 1 :(得分:0)
所有这些技巧在我的ubuntu机器上都无效。
最终,需要指定numpy和scipy版本。您可以通过
获取版本conda list > /tmp/conda_tmp1
pip install -U scikit-learn
conda list > /tmp/conda_tmp2
diff /tmp/conda_tmp1 /tmp/conda_tmp2
然后检查输出