django-admin commands, diango 1.10 with python 2 & python 3 on windows installed

26 views
Skip to first unread message

anton

unread,
Sep 26, 2016, 3:17:28 PM9/26/16
to django...@googlegroups.com
Hi,

I am using django 1.10.1 with the following configuration:

- windows 7 64bit
- python 2.7.12 32 bit

Now I am switching to python 3 so I installed additionally
python 3.5.2 64 bit.

I still need to keep python 2 because I have
also trac (https://trac.edgewall.org) with mercurial
(https://www.mercurial-scm.org) installed both still needing python2.

Now my question:

The windows PATH env variable contains python35 and python/scrips
paths.

With python 2.7 allone I could call on the console django
admin-commands like:

>> manage.py showmigrations
or simply
>> manage.py
to see all commands

Now woth both pythons installed
>> manage.py
shows me all commands

But if I try to execute one command like

>> manage.py showmigrations

it does ... nothing, no error ... nothing.

If I call python like

>> python

on the command line the python 3.5.2 shell starts

The only way to make the django-admin commands work
is to call them like this:

>> py -3 manage.py showmigrations

Now it works.
( of course prepending the full python exe path works too
like
>> c:\python35\python manage.py showmigrations )

Does somebody know the trick to use python 3.5 without the
need to use "py -3"?

Or is a simultanuously installation of python 2 and python 3 on windows
a no-go?

Thanks for a hint

Anton

Ricardo Daniel Quiroga

unread,
Sep 27, 2016, 8:54:33 AM9/27/16
to django...@googlegroups.com
Hi, Use and  create a virtualenv to work with your specific python version
> virtualenv -p <path/to/python/distribution> <path/to/new/virtualenv/>
alternative create a python2.bat and add to the path for call python, remove the secundary python from path
> python2




 Anton

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/nsbs5n%24sdk%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.



--

Ricardo Daniel Quiroga

Reply all
Reply to author
Forward
0 new messages