Asked  4 Months ago    Answers:  5   Viewed   498 times

I've installed Miniconda and have added the environment variable export PATH="/home/username/miniconda3/bin:$PATH" to my .bachrc and .bash_profile but still can't run any conda commands in my terminal.

Am I missing another setup? I'm using zsh by the way.

 Answers

45

If you're using zsh and it has not been set up to read .bashrc, you need to add the Miniconda directory to the zsh shell PATH environment variable. Add this to your .zshrc:

export PATH="/home/username/miniconda/bin:$PATH"

Make sure to replace /home/username/miniconda with your actual path.

Save, exit the terminal and then reopen the terminal. conda command should work.

Sunday, June 27, 2021
 
Strae
answered 4 Months ago
95

The difference is that miniconda is just shipping the repository management system. So when you install it there is just the management system without packages. Whereas with Anaconda, it is like a distribution with some built in packages.

Like with any Linux distribution, there are some releases which bundles lots of updates for the included packages. That is why there is a difference in version numbering. If you only decide to upgrade Anaconda, you are updating a whole system.

Wednesday, June 9, 2021
 
avon_verma
answered 5 Months ago
50

I solved the problem thanks to @darthbith 's comment.

Since conda is a bash function and bash functions can not be propagated to independent shells (e.g. opened by executing a bash script), one has to add the line

source /opt/anaconda/etc/profile.d/conda.sh

to the bash script before calling conda commands. Otherwise bash will not know about conda.

Saturday, June 19, 2021
 
SilverHorn
answered 4 Months ago
61

You can find the entire anaconda3 environment in a shortcut link named 'Relocated Items' on your desktop. It appears as though the upgrade to Catalina does not allow the Conda environment to be installed under a user directory now likely having to do with the new system volume move to a read-only partition.

This issue has been opened as far back as June 10th, I am a little disappointed that it was not resolved before the Catalina upgrade came around.

There is a solution that appears to work without losing your environment, see this link: https://github.com/ContinuumIO/anaconda-issues/issues/10998#issuecomment-539215005

From the link:

  1. Copy the folder anaconda3 located in Relocated Items to /Users/myname/

  2. Open Terminal

  3. Enter: export PATH='/Users/myname/anaconda3/bin:$PATH'

  4. Enter: conda init zsh

Wednesday, July 28, 2021
 
PHPWDev
answered 3 Months ago
75

It looks like conda is not able to reach the package repository, so you likely have connection issues (your firewall might be blocking conda, or maybe you are behind a proxy).

Here are 3 workaround (if you cannot fix your network problem):

1. Install Anaconda instead of Miniconda

You could install Anaconda from continuum website. Unlike Miniconda, it comes with a lot of pre-installed packages such as numpy and scipy.

2. Install numpy from a pre-built conda archive

You can manually download the archives package from the conda repository, and install them using:

conda install numpy.tar.bz2

You need to download the archive for your operating system. Depending on the package you chose, you may have issue with dependencies...

3. Download pre-built wheel files

This site1 provides tons of pre-built package for Windows, which are relatively easy to install:

python -m pip install numpy.whl

You should use the python executable that comes with conda (should not be an issue if you do not have multiple python installations on your system).

1 I am not the author nor the maintainer of this site, I just find it very useful when you want to install python packages on Windows and cannot use pip/conda.

Sunday, August 29, 2021
 
dzm
answered 2 Months ago
dzm
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :