【解决Anaconda安装报错】ERROR conda.core.link:_execute(740): An error occurred while installing package ‘defaults::scikit-learn-1.3.0-py311hf62ec03_0’.
问题说明:
在新电脑上安装anaconda2023年的最新版本时,出现以下报错:
Downloading and Extracting Packages
Preparing transaction: ...working... done
Executing transaction: ...working... WARNING conda.core.envs_manager:register_env(49): Unable to register environment. Path not writable or missing.
environment location: D:\A
registry file: C:\Users\wangxue\.conda\environments.txt
Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
For example:
$ conda install scikit-learn-intelex
$ python -m sklearnex my_application.py
done
ERROR conda.core.link:_execute(740): An error occurred while installing package 'defaults::scikit-learn-1.3.0-py311hf62ec03_0'.
Rolling back transaction: ...working... done
LinkError: post-link script failed for package defaults::scikit-learn-1.3.0-py311hf62ec03_0
location of failed script: D:\A\Scripts\.scikit-learn-post-link.bat
==> script messages <==
Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
For example:
$ conda install scikit-learn-intelex
$ python -m sklearnex my_application.py
==> script output <==
stdout: subdir: win-64
stderr: \u03f5\u0373\ufffd\u04b2\ufffd\ufffd\ufffd\u05b8\ufffd\ufffd\ufffd\ufffd\ufffd\u013c\ufffd\ufffd\ufffd
\u03f5\u0373\ufffd\u04b2\ufffd\ufffd\ufffd\u05b8\ufffd\ufffd\ufffd\ufffd\ufffd\u013c\ufffd\ufffd\ufffd
return code: 1
()
尝试解决但是失败的办法
1. 下载2023年三月份的安装包,仍然失败,报相同的错误
2. Google搜索报错,只发现了23年八月份的相同问题,但是下面没有对应的解决办法回复
3. 百度搜索报错,发现了一篇在Linux系统下安装的解决办法,是在安装文件夹下面新建一个空txt文件,我尝试新建以后,安装的时候提示需要一个空文件夹目录,所以也行不通。文章指路:https://blog.csdn.net/jiangnanjunxiu/article/details/128443980
最后成功安装的办法
这个问题没有解决,只是安装了22年的版本,具体来说是十月份的,然后就没有报错了
2023 11 30 补充:
因为报错说的是安装包的时候有问题,或者也可以直接安装Miniconda,这样的话就会只安装Python和conda,不涉及packages的事情,今天早上试了也没有问题,都是可能后续配环境还有碰到安装这个包的问题。