2017-04-04 2 views
2
zeigt

I 2.7.13 auf macOS Sierra haben und ich versuche zu python3 überVersuch python3 zu installieren, aber Terminal hält als Python 2.7.13

brew install python3 

alles zu aktualisieren scheint mit Ausnahme der letzten ging gut zu haben Teil:

==> Installing python3 
==> Downloading https://homebrew.bintray.com/bottles/python3-3.6.1.sierra.bottle 
######################################################################## 100.0% 
==> Pouring python3-3.6.1.sierra.bottle.tar.gz 
==> Using the sandbox 
==> /usr/local/Cellar/python3/3.6.1/bin/python3 -s setup.py --no-user-cfg instal 
==> /usr/local/Cellar/python3/3.6.1/bin/python3 -s setup.py --no-user-cfg instal 
==> /usr/local/Cellar/python3/3.6.1/bin/python3 -s setup.py --no-user-cfg instal 
==> Caveats 
Pip, setuptools, and wheel have been installed. To update them 
    pip3 install --upgrade pip setuptools wheel 

You can install Python packages with 
    pip3 install <package> 

They will install into the site-package directory 
    /usr/local/lib/python3.6/site-packages 

See: http://docs.brew.sh/Homebrew-and-Python.html 
==> Summary 
    /usr/local/Cellar/python3/3.6.1: 3,600 files, 55.8MB 

nach dem I-Typ

python 

und ich

Python 2.7.13 (default, Dec 17 2016, 23:03:43) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 

Ich bin ziemlich neu zu Codierung, so dass jede Hilfe geschätzt wird!

+0

@ParthapratimNeog es ist nicht das gleiche O.S. – Trimax

Antwort

5

Python 2.x und Python 3.x haben unterschiedliche Terminalbefehle.

Verwenden Befehl: python3 verwendet Python 3.x

ähnlich verwendet pip3 für die Installation von Python-Modulen.


Hinweis: Versuchen Sie auch virtualenv (virtuelle Umgebungen) zu lernen, so dass Sie Ihren Python 2.x und Python 3.x Umgebungen trennen halten können.

Es gibt viele Tutorials zu tun, eine solche ist this tutorial.

Verwandte Themen