Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fix corrupt environment conda

Tags:

conda

In conda, when I tried to install a package, I got this error:

 CorruptedEnvironmentError: The target environment has been corrupted. Corrupted environments most commonly
    occur when the conda process is force-terminated while in an unlink-link
    transaction.
      environment location: /home/user/anaconda3/envs/myenv
      corrupted file: /home/user/anaconda3/envs/myenv/conda-meta/qt-5.9.7-h5867ecd_1.json

I think my RAM is kind of messed up due to previous electricity disconnections so that might be the cause of this. How would I fix this?

like image 640
dan dan Avatar asked Feb 21 '19 03:02

dan dan


1 Answers

The following worked for me. TL;DR of @Jordan's answer.

  1. Try to install package again via conda
  2. Remove the file claimed to be corrupt
  3. Repeat steps 1 and 2 until package successfully installs
  4. Run conda update --all for good measure
like image 189
Haran Rajkumar Avatar answered Sep 18 '22 18:09

Haran Rajkumar