When you are working on Conda based environments you should know How to update packages on Conda. This is useful when you are trying to use the latest version of the packages which you wish to use in your projects.
To see if a new update is available, use the conda update command. You can decide whether or not to install an update after conda notifies you that one is available.
To update packages on Conda, first you need to check if new updates are available by running the right codes. Then you will have to run the command ‘conda update example_pacakage
‘ to update the package you wish to update.
You can also update your python version as well as your conda version which you are using in your system.
To update packages on Conda, you can follow the steps mentioned below:
First, To see if a new update is available, use the conda update command. You can decide whether or not to install an update after conda notifies you that one is available.
For the above mentioned actions or codes, use an Anaconda Prompt or the terminal in your system:
To upgrade a certain package use the code mentioned below, given below the biopython is an example package:
conda update biopython
To upgrade python version which you are using you will have to use the code mentioned below:
conda update python
To upgrade conda version which you are using you will have to use the code mentioned below:
conda update conda
Note: Conda upgrades to the most recent version in its line, which causes Python 3.8 to upgarde to the most recent version of the 3.x series.
To upgrade Anaconda metapackage version which you are using you will have to use the code mentioned below:
conda update conda conda update anaconda
Conda compares versions regardless of the package you are updating and then reports what is available for installation. Conda reports that “All requested packages are already installed” if no updates are available.
Type y to upgrade if a newer version of your package is available and you want to do so as mentioned below:
Proceed ([y]/n)? y
This should help you understand, “How to update packages on Conda”.
Conclusion
To update packages on Conda first you will have to check if new updates are available by running the right codes.
Then you will have to run the code conda update example_pacakage
to update any package you wish to update. You can also update your python version as well as your conda version which you are using in your system.