Gramex does not run after installing via conda

46 Views Asked by At

The Gramex installation instructions says:

conda create -y --name gramex python=3.7            # Create a new environment
conda activate gramex                               # Activate it
conda install -y -c conda-forge -c gramener gramex  # Install Gramex

But Step 2 (conda activate gramex) doesn't work on Linux / Cygwin because of the following error:

your shell has not been properly configured

2

There are 2 best solutions below

0
On

This happens, because your shell (I suspect bash) is not initialized for conda. This happens in case you did select NO during the installation, when it asked

Do you wish the installer to initialize Anaconda3 by running conda init?

A temporary solution from the anaconda FAQ (section "Should I add Anaconda to the macOS or Linux PATH?") is to run:

source <path to conda>/bin/activate

if you want a permanent solution, simply do

source <path to conda>/bin/activate
conda init bash

which will modify your ~/.bashrc to include the shell initialization

2
On

This may happen if your shell is not initialized for conda. See https://github.com/conda/conda-build/issues/3371

One way to solve this is to run:

eval "$(conda shell.bash hook)"

This will enable conda activate, and you can run conda activate gramex.