Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reinstall conda and packages from scratch

Tags:

conda

anaconda

I have my conda corrupted due to pip install. After manipulations, I end up having 2 Python 2.7 interprete in the same conda root env.....

I have other conda env. safe and intact. How to re-isntall the default root env in a clean way ? I have exported the packages by :

conda list --explicit > spec-file.txt   
conda create --name myenv --file spec-file.txt     # Create Env using a file
like image 965
tensor Avatar asked Aug 29 '17 15:08

tensor


People also ask

Does deleting conda environment delete packages?

The conda environment will be deleted. Sometimes some packages stay behind, although they are not bound to any environment.

How to install or uninstall a Python package in conda?

Run the command conda install package-name to install the python package like below. After you successfully install the python package, you can run the command conda list package-name to verify that it has been installed. To uninstall a python package, you can run the command conda uninstall package-name.

What is the use of conda install?

conda install ¶. conda. install. ¶. Installs a list of packages into a specified conda environment. This command accepts a list of package specifications (e.g, bitarray=0.8) and installs a set of packages consistent with those specifications and compatible with the underlying environment. If full compatibility cannot be assured, ...

How do I prevent a package from updating in conda?

To prevent existing packages from updating, use the --freeze-installed option. This may force conda to install older versions of the requested packages, and it does not prevent additional dependency packages from being installed. If you wish to skip dependency checking altogether, use the '--no-deps' option.

Do I need to uninstall and reinstall Anaconda?

It has been recommended that I completely uninstall and reinstall Anaconda. This seems like overkill, but I am going to try it. Nothing I attempted using conda or the Anaconda environment console seemed to work.


1 Answers

Solution :

1) reinstall minconda in a new folder 2) Remove duplicates in spec-file.txt 2) create new conda env using the spec-file.txt

Cleaner and better way I found.... (also backing up the conda folder is also a good solution)

like image 106
tensor Avatar answered Oct 20 '22 06:10

tensor