django-admin.py and virtualenv issue on Windows

后端 未结 6 2024
青春惊慌失措
青春惊慌失措 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 03:52

    I had to point the "global python.exe" to my virtualenv in my project so I created my own activate.cmd

    set THE_PATH=c:\my-envs\my-specific-env\Scripts
    ftype Python.File="%THE_PATH%\python.exe" %%1 %%*
    %THE_PATH%\activate.bat
    

    It changes the the file type association using windows command 'ftype'.

提交回复
热议问题