Score:0

How to restore python virtual environment after OS reinstallation

ar flag

I had a python virtual environment and many libraries installed in it. As my OS got corrupted, I had to reinstall ubuntu 18.04. However my virtual env was in another drive and it is safe.

But after re installation of OS and the same python version, when I source (activate) my env, all my older libraries are not working.

Although in the site packages in the env I can see all the library folders but none of them are working. How to restore my libraries?

Thanks in advance!

CatMan avatar
fr flag
Its not directly and answer but maybe a woraround. If you can list the files maybe you can put them into a requirements.txt file and install them using "pip download -r requirements.txt -d <your target/venv>". That way you will have the list handy for any future desaster.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.