Ich habe sowohl Python 2.7 und 3.5 installiert. Wenn ich ein Skript von der Kommandozeile mit python
ausführen, verwendet es Python 2.7, aber wenn ich ipython starten, verwendet es Python 3:Wie iPython verwendet Python 2 anstelle von Python 3
[email protected]:~$ python -V
Python 2.7.12
[email protected]:~$ ipython
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]:
Gibt es eine Möglichkeit ipython zu starten, so dass es 2 Python verwendet? (Ich benutze Ubuntu LTS 16.04).
Wie haben Sie ipython installiert? – Nurjan
Ich bin immer noch auf der Suche nach einer Lösung, weil die virtuellen Umgebungen keinen Zugriff auf andere Module haben, die nicht mit 'pip' installiert wurden, wie' rethinkdb'. [Nurzhan] (http://stackoverflow.com/users/671150/nurzhan), ich erinnere mich nicht genau, wie ich iPython installiert habe, aber ich glaube, ich habe die .whl-Datei heruntergeladen und 'pip install [ipython_file] .whl' . –
Ich installierte ipython auf xubuntu 16.04 LTS mit 'sudo apt-get install ipython'. Es verwendet standardmäßig Python 2.7.12. Ich weiß nicht, warum du dieses Problem hast. Ich weiß, dass vim ab Ubuntu 16.04 LTS standardmäßig mit python3 läuft. – Nurjan