Surviving Windows

Surviving Anaconda & pip on Windows

Since WinPython inexplicably blew up in my face some months ago (SciPy lost a DLL or something) and I couldn't for the life of me figure out how to fix it), I've been using Anaconda for my scientific Python needs on Windows. It appears to work. More or less.

conda

Conda is Anaconda's package manager. Why they have something other than pip to manage Python packages is beyond me. Apparently, it is recommended to use it to install packages when possible, but conda does not have all PyPI packages.

conda install pandas

and so on. To update all packages, conda has a handy command:

conda update --all

THIS WILL PROBABLY DOWNGRADE SOME pip-INSTALLED PACKAGES, INCLUDING pip ITSELF.

pip + PowerShell

Pip doesn't (yet) have an upgrade-all command, so you have to let your shell help you. On Linux, I might do something like (untested)

pip list --outdated | gawk '// { print $1; }' | xargs pip install --upgrade

On Windows PowerShell, this works:

$outdated_packages = pip list --outdated | foreach { $_.split()[0] }
pip install --upgrade $outdated_packages

Comments

There are no comments yet.

Add a Comment

You will receive an email asking you to confirm your comment. Your email address will not be published. Your email address will be deleted after two weeks, unless I choose to contact you directly before then.

You can use Markdown (no HTML) syntax to format your comment.