2
!conda --version
/bin/bash: conda: command not found

I have installed miniconda and have chosen to automatically add environment variables, but I still can't use them. I am using Google Colab.

WARNING:
You currently have a PYTHONPATH environment variable set. This may cause
unexpected behavior when running the Python interpreter in Miniconda3.
For best results, please verify that your PYTHONPATH only points to
directories of packages that are compatible with the Python interpreter
in Miniconda3: /root/miniconda3

Do you wish the installer to initialize Miniconda3
in your /root/.bashrc ? [yes|no]
[no] >>> yes

Initializing Miniconda3 in /root/.bashrc
A backup will be made to: /root/.bashrc-miniconda3.bak


For this change to become active, you have to open a new terminal.

Thank you for installing Miniconda3!
user10336501
  • 21
  • 1
  • 3
  • Try this, is the link bellow :) [Maybe this will help you!](https://stackoverflow.com/a/54725966/11079859) – FFAE Mar 22 '19 at 11:48
  • What package are you attempting to install? (It's possible there a simpler recipe that does not require a full conda distribution.) – Bob Smith Mar 22 '19 at 14:44

1 Answers1

1

Conda init

Try running Conda's initialization method manually. First check to see what it would do:

/root/miniconda3/bin/conda init --dry-run -vv

This should generate a diff output, plus a list of files it is checking for, marked with either modified or no change. If the proposed changes look good, then go ahead and run it without the --dry-run.

Things should then work correctly once you open a new shell, or source whatever file it changed (e.g., .bashrc).


Don't Edit PATH (in Conda >=4.4)

Note this advice is for the most recent versions of Conda (v4.4+, AFAIK). For older versions it used to be recommended to directly add the bin directory to PATH, but this is now discouraged (see Conda v4.4 Release Notes).

merv
  • 67,214
  • 13
  • 180
  • 245