0

[Edit] Added conda info to question.

Something wrong is happening with my conda setup. From what I remember, I needed the AI gym library for a lab at my university.

I tried to install it using conda install -c akode gym and I was unable to do so. I used a pip install instead.

Since then, I am having the following error whenever I start a new terminal:

Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
ImportError: No module named conda

Conda and all the related software and packages work very fine though.

This is my OS config :

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

This is the output of conda info :

     active environment : base
    active env location : /home/cnemri/anaconda3
            shell level : 1
       user config file : /home/cnemri/.condarc
 populated config files : 
          conda version : 4.8.0
    conda-build version : 3.18.11
         python version : 3.7.5.final.0
       virtual packages : __glibc=2.27
       base environment : /home/cnemri/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/cnemri/anaconda3/pkgs
                          /home/cnemri/.conda/pkgs
       envs directories : /home/cnemri/anaconda3/envs
                          /home/cnemri/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.0 requests/2.22.0 CPython/3.7.5 Linux/4.15.0-1065-oem ubuntu/18.04.3 glibc/2.27
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False

How can I not have this error anymore ?

Thank you.

cnemri
  • 454
  • 4
  • 14
  • was it installed correctly? have you tried removing it? – WhatsThePoint Dec 17 '19 at 10:08
  • Conda was initially installed correctly. But since I did the pip install, I am having the error. Again, it does not prohibit conda and all the packages and environments from working. I did not try to remove it and install it again. I am afraid of losing all my current packages and environments. Is there a way to reinstall it with all my current configurations ? – cnemri Dec 17 '19 at 10:15
  • You can probably export the package lists for your current environments, get rid of conda, reinstall it, and finally recreate the environments. – AMC Dec 17 '19 at 10:48
  • What version of Conda? Consider adding output from `conda info` to your question. – merv Dec 17 '19 at 15:33
  • I've added conda info to my question. – cnemri Dec 17 '19 at 20:36
  • Possibly related to a v4.8.0 bug (see this question: https://stackoverflow.com/questions/59317257/import-conda-error-traceback-upon-opening-terminal). Try downgrading to 4.7.12 (`conda install -n base -c defaults conda`). – merv Dec 18 '19 at 16:02
  • Oh, actually, it's fixed. So `conda update conda` should fix it for you. – merv Dec 18 '19 at 23:54
  • Thank you @merv `conda update conda` works like a charm. – cnemri Dec 19 '19 at 09:51

1 Answers1

0

The error has been fixed, I did a conda update conda as advised by @merv and it works very fine. The error disappeared.

cnemri
  • 454
  • 4
  • 14