Tuesday, September 27, 2016

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

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



2016-09-26 16:16 GMT-03:00 anton <antonxx@gmx.de>:
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

--
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-users@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

--
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-users@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/CAO2-wHaS0QedpDFqGT3OBTuG8ZtHhGhxE2yh4n72jj_EXuRn-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment