Anaconda5以上在Windows系统安装后,conda不是内部或外部命令,scripts中activte.bat不是内部或外部命令

Anaconda5 在Win10系统安装后,conda不是内部或外部命令

Anaconda也在很多台电脑上装过了,Windows系统和Linux系统都装过。
但是这次是头一次遇上棘手的问题:
安装“完成”后,在command window中输入“conda -V”想查看anaconda是否安装成功时却尴尬了:

'conda' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

What???

上网查了部分资料,很多都在讲环境变量配置的问题。
自己打开环境变量一看,What???

瞬间懵了…

打开Anaconda Prompt
赫然有一条提醒:

'C:\Anaconda3\Scripts\activate.bat' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

What???

打开Scripts,发现,没有conda.exe,也没有activate.bat
What???

更换关键词,再一顿搜索,终于有一篇博客讲到了有用的东西:
https://blog.csdn.net/Tomxiaodai/article/details/80411794
在此特别感谢这位前辈

把他的内容再结合我的经历整合一下:
钥匙是这个链接
http://docs.anaconda.com/anaconda/user-guide/troubleshooting/#cannot-open-anaconda-prompt-after-installation
重点是anaconda的这段解释:

Cannot open Anaconda Prompt after installation

I get an error message that says “activate.bat is not a recognized file or command”.

Cause

Anaconda 5.0.1 sometimes does not install completely on Windows.

Solution
Until a new version is released, you can install Miniconda, and then use conda to install the rest of the packages in Anaconda with these instructions:

Open the command prompt (Windows key + the R key on your keyboard) which brings up the Run… dialog box. Enter cmd.exe and then press enter)

Copy the following text:

cd %UserProfile%
powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe', 'mc3.exe') }"
start /wait "" mc3.exe /InstallationType=JustMe /AddToPath=0 /RegisterPython=0 /NoRegistry=0 /S /D=%UserProfile%\anaconda3
%UserProfile%\anaconda3\Scripts\activate.bat
conda install -y anaconda=5.0.1 conda-build _ipyw_jlab_nb_ext_conf

Then paste it into the command prompt window.
NOTE: This installs to a subdirectory in your User directory named anaconda3. If you use a different directory, replace anaconda3 with the actual name.

翻译一下,大体意思就是,Anaconda5在windows系统上安装时,有时候会安装不完整——坑!
解决办法是打开你的cmd,把这段命令输入进去,通过

miniconda自动补全未安装完整的部分内容

这个地方注意一点,这段命令里,

conda install -y anaconda=5.0.1 conda-build _ipyw_jlab_nb_ext_conf

版本应该根据你自己实际安装的版本来填,否则在安装时会自动检测到版本冲突。

希望有跟我一样情况的同学不要再去折腾环境变量了。

  • 4
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值