django-admin.py and virtualenv issue on Windows

后端 未结 6 2023
青春惊慌失措
青春惊慌失措 2021-02-08 03:28

In my system there is Django 1.2.3 installed system wide:

C:\\>python -c \"import django; print django.get_version()\"
1.2.3
C:\\>django-admin.py --version         


        
6条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-08 04:13

    This is because your windows has associated .py extension with the globally installed python.exe. Therefore when you type django-admin.py, even though you're in a virtualenv, the global python is invoked, and it in turn finds your global django installation in its own site-packages. Try python django-admin.py to circumvent the association.

提交回复
热议问题