Anaconda environment recover:How to recover an Anaconda environment that was deleted by mistake

How to recover envs which is removed by mistake

I have removed an pytorch environment in anaconda , in gui. After that, Anaconda Gui environment tags cannot find the envs(pytorch).
But its file folder can find /users/anaconda3/envs , it has existed.
And it can activate by command line in base , i try to install its packages by command line, sucefully.
But in the envs, the pytorch cannot used, it didn’t happen before. like this.

‘’’
ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_6832/1579222628.py in
----> 1 import torch
2 x = torch.rand(5, 3)
3 print(x)

ModuleNotFoundError: No module named 'torch

‘’’

How can i recover the former envs?

1 Like

Howdy!

Were you able to create a backup of your Anaconda installation at any point? If you did; you should be able to reimport the PostgreSQL database, as well as the archive file that would have been made from any such backup, which should contain your working .env files.

You can read more about backing up and restoring Anaconda within the documentation at:

https://server-docs.anaconda.com/en/latest/install/restore.html

1 Like