How to check Django version

后端 未结 26 2570
梦如初夏
梦如初夏 2020-12-04 04:36

I have to use Python and Django for our application. So I have two versions of Python, 2.6 and 2.7. Now I have installed Django. I could run the sample application for testi

26条回答
  •  一整个雨季
    2020-12-04 05:20

    As you say you have two versions of Python, I assume they are in different virtual environments (e.g. venv) or perhaps Conda environments.

    When you installed Django, it was likely in only one environment. It is possible that you have two different versions of Django, one for each version of python.

    In from a Unix/Mac terminal, you can check your Python version as follows:

    $ python --version
    

    If you want to know the source:

    $ which python
    

    And to check the version of Django:

    $ python -m django --version
    

提交回复
热议问题