Skip to content

Instantly share code, notes, and snippets.

@andrewsantarin
Last active February 11, 2018 10:39
Show Gist options
  • Save andrewsantarin/2a29fea062fdb86976594e35385673fa to your computer and use it in GitHub Desktop.
Save andrewsantarin/2a29fea062fdb86976594e35385673fa to your computer and use it in GitHub Desktop.
Getting django-admin with multiple versions of Python installed in your Windows machine

For example:

If you have Python 2.7.13 installed in the PATH env var and you want to leave it alone, but you also want to install the latest Python 3.6.4 version, then you should use virtualenv for Windows.

You'll also need this command to specifically use the target Python version in the target virtualenv, in this case, 3.6.4:

$ mkvirtualenv -p <DRIVE:\path\to\the\latest\Python[version-number]>\python.exe <your-new-virtualenv>

Reference: https://teamtreehouse.com/community/virtualenv-for-different-python-versions#answer-3056562

For example, if your virtualenv is called my-api, this command will install Python 3.6.4 to my-api, and all mentions of python, pip, django, django-admin and whatever packages you install in the future will refer to the one installed in this environment only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment