Skip to main content

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

Comments

  1. Best bets for soccer today - Sports Toto
    Today, casinosites.one we're going to tell you a 토토 few key https://septcasino.com/review/merit-casino/ to checking 토토사이트 into soccer betting apps. of the most popular soccer betting options and 출장샵 which ones will

    ReplyDelete

Post a Comment

Popular posts from this blog

Increasing Python maximum line length used by Visual Studio Code autoformat

Recently, I was struggling with setting the correct formatting options for Python code in Visual Studio Code. I added the option --max-line-length=180 to the python.linting.pylintArgs , without success. After some time I discovered that Pylint is used by Visual Studio Code by default for linting, and autopep8 for formatting. Simply adding the option --max-line-length=180 to python.formatting.autopep8Args solved the problem. Now both Pylint and autopep8 are in sync. Simply use the following user settings file for Visual Studio Code for all of this to work... { "python.linting.pylintArgs" : [ "--max-line-length=180" ], "python.formatting.autopep8Args" : [ "--max-line-length=180" ] }