win10系统—conda环境激活失败!!!来看看我的办法,希望对你有用

本来是想调用py3环境跑代码的,然后输入却失败了:

conda activate py3

完整报错如下:

I:\CycleGAN-TensorFlow-master>conda activate py3

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with

    $ echo ". C:\Users\Administrator\Anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc

or, for all users, enable conda with

    $ sudo ln -s C:\Users\Administrator\Anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh

The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH.  To do so, run

    $ conda activate

in your terminal, or to put the base environment on PATH permanently, run

    $ echo "conda activate" >> ~/.bashrc

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bashrc file.  You should manually remove the line that looks like

    export PATH="C:\Users\Administrator\Anaconda3/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^

网上找了很多帖子:

办法一:激活环境

source activate

但是我输入还是不行,反而再次报错:

I:\CycleGAN-TensorFlow-master>source activate
'source' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

办法二:这个办法可以解决我的问题,顺利进入环境!!!

activate py3

就是直接activate加上你的环境名字,就好了。

I:\CycleGAN-TensorFlow-master>activate py3

(py3) I:\CycleGAN-TensorFlow-master>

 

你可能感兴趣的:(我的艰难进步之路)