Python Versions Probleme

01/31/2018 19:36 Reaper of Souls#1
Servus,

Ich habe das Problem dass ich django nicht installieren kann weil ich zwei python Versionen habe 2.7 und 3.6 und aus irgendwelchen Gründen ignoriert er die 3.6 Version.

Wenn ich python -V mache kommt direkt 2.7 wenn ich das mitm anderen Befehl mache zeigt er mir aber auch an dass ich 3.6 habe.

Python 2.7 kann ich aber auch net deinstallieren weils mirs System sonst zerbügelt.

Terminalausgabe:

Code:
==========================
Unsupported Python version
==========================

This version of Django requires Python 3.5, but you're trying to
install it on Python 2.7.

This may be because you are using a version of pip that doesn't
understand the python_requires classifier. Make sure you
have pip >= 9.0 and setuptools >= 24.2, then try again:

    $ python -m pip install --upgrade pip setuptools
    $ python -m pip install django

This will install the latest version of Django which works on your
version of Python. If you can't upgrade your pip (or Python), request
an older version of Django:

    $ python -m pip install "django<2"
Kann ich das script irgendwie mit 3.6 ausführen?
01/31/2018 23:33 Der-Eddy#2
Versuch mal python3 anstelle von python
In den meisten Distributionen leitet python immer noch zu /usr/bin/python2.7 um
python3 leitet dagegen zu /usr/bin/python3.x um
Gleiche gilt übrigens auch für pip
pip3 leitet meistens zum pip für Python3 um

Alternativ kannst du auch ein [Only registered and activated users can see links. Click Here To Register...] anlegen
02/01/2018 13:30 C_O_R_E#3
As @[Only registered and activated users can see links. Click Here To Register...] already mentioned it, you can go for the command: python3
prerequisites: you already installed it.

If you want to use the command 'python' as an alias of 'python3' - just
make use of your home bashrc and add an alias.

like:

~/.bashrc or ~/.bash_aliases

Code:
alias python=python3
Take care, if you run custom shell scripts, which probably a part of an automated process, you should
avoid adding aliases - since they would run with python3 instead of python2.7 and might cause conflicts in your process routine.