Skip to main content

Posts

Showing posts from July, 2019

Updating your Anaconda and Python installation the easy way

As I was tired keeping my Anaconda and Python software and packages up-to-date doing manual commandline instructions on a regular basis, I decided to just write a script that can be called in an automated way and eventually cleans up legacy packages to free up disk space. Save the following commands as update-anaconda-python.ps1 , I hope it also makes you life easier... Write-Host "Updating Anaconda ..." conda update --all --yes Write-Host "Cleaning Anaconda ..." conda clean --all --yes Write-Host "Updating pip ..." python -m pip install --upgrade pip Write-Host "Updating python packages ..." pip list | ForEach-Object { pip install --upgrade $_.Split()[0] } You'll need to make sure PowerShell can run the untrusted script by executing the following command once: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser