set python 3.6.8 default in my ubuntu

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

set python 3.6.8 default in my ubuntu

omar ahmed
hello ..
just finished my first project with django but i can not publish it because my default python is python 2.7.12 and Heroku now does not support it ..
now i installed python 3.6.8 .... how can i set it as default python version to make my projects with virtualenv ?
thanks in advance

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: set python 3.6.8 default in my ubuntu

Nick Sarbicki
Hi Omar,

It is generally recommended to _not_ set python3 as your system default. This is stated in PEP 394. The reasoning being there may be internal and third party processes which still expect the default python to be 2.x. Updating the default to python3 will likely break these and could cause unexpected problems.

You can however create a virtualenv with python3 by simply running virtualenv env -p python3.

It is also worth noting that as far as I know Heroku does support python3. There is some documentation on this here.

- Nick


On Wed, May 22, 2019 at 1:48 PM omar ahmed <[hidden email]> wrote:
hello ..
just finished my first project with django but i can not publish it because my default python is python 2.7.12 and Heroku now does not support it ..
now i installed python 3.6.8 .... how can i set it as default python version to make my projects with virtualenv ?
thanks in advance

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAGuvt92hrnjiMbsywLx%3D0zxN-4qsE7Z7CVybM0F7bDLK5sMOSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: set python 3.6.8 default in my ubuntu

omar ahmed
ok .. i did it but it make my env with python3.5


On Wednesday, May 22, 2019 at 3:09:37 PM UTC+2, Nick Sarbicki wrote:
Hi Omar,

It is generally recommended to _not_ set python3 as your system default. This is stated in <a href="https://www.python.org/dev/peps/pep-0394/#future-changes-to-this-recommendation" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0394%2F%23future-changes-to-this-recommendation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH73o2Y0cF5nn5RpwTvWcMC2-8ZVQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0394%2F%23future-changes-to-this-recommendation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH73o2Y0cF5nn5RpwTvWcMC2-8ZVQ&#39;;return true;">PEP 394. The reasoning being there may be internal and third party processes which still expect the default python to be 2.x. Updating the default to python3 will likely break these and could cause unexpected problems.

You can however create a virtualenv with python3 by simply running virtualenv env -p python3.

It is also worth noting that as far as I know Heroku does support python3. There is some documentation on this <a href="https://devcenter.heroku.com/articles/python-runtimes" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdevcenter.heroku.com%2Farticles%2Fpython-runtimes\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXqwbs77ELDTzr5mfsw54uzsWcRw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdevcenter.heroku.com%2Farticles%2Fpython-runtimes\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXqwbs77ELDTzr5mfsw54uzsWcRw&#39;;return true;">here.

- Nick


On Wed, May 22, 2019 at 1:48 PM omar ahmed <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q0gprLMoBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">omark...@...> wrote:
hello ..
just finished my first project with django but i can not publish it because my default python is python 2.7.12 and Heroku now does not support it ..
now i installed python 3.6.8 .... how can i set it as default python version to make my projects with virtualenv ?
thanks in advance

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q0gprLMoBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q0gprLMoBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/89c67f74-2ee9-4fdc-b300-9bd701a45a46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: set python 3.6.8 default in my ubuntu

Aldian Fazrihady
Omar, if you upgraded your system to Ubuntu 18.04,  it will install Python 3.6 for you.


Aldian Fazrihady

On Wed, May 22, 2019 at 9:22 PM omar ahmed <[hidden email]> wrote:
ok .. i did it but it make my env with python3.5


On Wednesday, May 22, 2019 at 3:09:37 PM UTC+2, Nick Sarbicki wrote:
Hi Omar,

It is generally recommended to _not_ set python3 as your system default. This is stated in PEP 394. The reasoning being there may be internal and third party processes which still expect the default python to be 2.x. Updating the default to python3 will likely break these and could cause unexpected problems.

You can however create a virtualenv with python3 by simply running virtualenv env -p python3.

It is also worth noting that as far as I know Heroku does support python3. There is some documentation on this here.

- Nick


On Wed, May 22, 2019 at 1:48 PM omar ahmed <[hidden email]> wrote:
hello ..
just finished my first project with django but i can not publish it because my default python is python 2.7.12 and Heroku now does not support it ..
now i installed python 3.6.8 .... how can i set it as default python version to make my projects with virtualenv ?
thanks in advance

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/89c67f74-2ee9-4fdc-b300-9bd701a45a46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAN7EoAZYeqcxCo4obXOw5W538Xbz6HFA-_jK_zBc3c15P5CRUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: set python 3.6.8 default in my ubuntu

Chetan Ganji
Hi Omar,

I have added these settings to me ~/.bashrc file in Kubuntu 18.04.
Same would work for rest of the linux with minor changes.
First group would be your answer. 
Second groups of lines are used for virtualenv settings
Third group of lines are to make my life easier by saving me typing the same commands over and over. These are the 3 commands that I use most of the time.


# *************************** RyuCoder Settings Start ********************************

alias python=python3.7
alias python3=python3.7
alias pip='python3.7 -m pip'
alias sudopip='sudo python3.7 -m pip'

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.7
export WORKON_HOME=~/ENV
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
source /usr/local/bin/virtualenvwrapper.sh

alias run='python manage.py runserver'
alias migrations='python manage.py makemigrations'
alias migrate='python manage.py migrate'

# *************************** RyuCoder Settings End ********************************



Regards,
Chetan Ganji
+91-900-483-4183


On Wed, May 22, 2019 at 6:57 PM Aldian Fazrihady <[hidden email]> wrote:
Omar, if you upgraded your system to Ubuntu 18.04,  it will install Python 3.6 for you.


Aldian Fazrihady

On Wed, May 22, 2019 at 9:22 PM omar ahmed <[hidden email]> wrote:
ok .. i did it but it make my env with python3.5


On Wednesday, May 22, 2019 at 3:09:37 PM UTC+2, Nick Sarbicki wrote:
Hi Omar,

It is generally recommended to _not_ set python3 as your system default. This is stated in PEP 394. The reasoning being there may be internal and third party processes which still expect the default python to be 2.x. Updating the default to python3 will likely break these and could cause unexpected problems.

You can however create a virtualenv with python3 by simply running virtualenv env -p python3.

It is also worth noting that as far as I know Heroku does support python3. There is some documentation on this here.

- Nick


On Wed, May 22, 2019 at 1:48 PM omar ahmed <[hidden email]> wrote:
hello ..
just finished my first project with django but i can not publish it because my default python is python 2.7.12 and Heroku now does not support it ..
now i installed python 3.6.8 .... how can i set it as default python version to make my projects with virtualenv ?
thanks in advance

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/2dafe695-66c0-42a3-b92e-a71881401ab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/89c67f74-2ee9-4fdc-b300-9bd701a45a46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAN7EoAZYeqcxCo4obXOw5W538Xbz6HFA-_jK_zBc3c15P5CRUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAMKMUjuQUUEQUt5ozf2N3kkV3daXD30z%2BJU7MwmTY7Qnvg8-1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: set python 3.6.8 default in my ubuntu

omar ahmed
In reply to this post by Nick Sarbicki
thank you nick it works

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/12251afa-2b7d-4c4a-8b8b-2521de8076a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: set python 3.6.8 default in my ubuntu

johnpaul mulongo
In reply to this post by omar ahmed


On Wednesday, May 22, 2019 at 3:48:16 PM UTC+3, omar ahmed wrote:
hello ..
just finished my first project with django but i can not publish it because my default python is python 2.7.12 and Heroku now does not support it ..
now i installed python 3.6.8 .... how can i set it as default python version to make my projects with virtualenv ?
thanks in advance
 
You could also try to check out pyenv. It's a pretty handy when dealing with python versions.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/7d9828d2-eaae-4f78-a551-b612edd89080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: set python 3.6.8 default in my ubuntu

James Schneider
No
On Wed, May 22, 2019, 10:22 AM johnpaul mulongo <[hidden email]> wrote:


On Wednesday, May 22, 2019 at 3:48:16 PM UTC+3, omar ahmed wrote:
hello ..
just finished my first project with django but i can not publish it because my default python is python 2.7.12 and Heroku now does not support it ..
now i installed python 3.6.8 .... how can i set it as default python version to make my projects with virtualenv ?
thanks in advance
 
You could also try to check out pyenv. It's a pretty handy when dealing with python versions.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/7d9828d2-eaae-4f78-a551-b612edd89080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CA%2Be%2BciU0N0zO2EHeB5z-tmB5fxKt%3DxWsvTGd%3DoEoRSqz%3DdMNQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.