私はpython3.6がインストールされたubuntu 14.04マシンで作業しています。私は「のpython3」を使用してPythonシェルを起動すると以下のように、それはpython3.6.1バージョンを起動するコマンドと私は正常にパンダライブラリpython3.6ではなくpython3.4を使用するipython
python3
Python 3.6.1 (default, Jun 13 2017, 21:37:44)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>>
をインポートすることができるよしかし、私は、コマンドによってipythonシェルを起動するときipython3では、以下に示すようにpython 3.4.3を使用していますので、pandasライブラリをインポートできません。 ipython3にpython3.6.1バージョンを使用するように指示するにはどうすればよいですか?
ipython3
Python 3.4.3 (default, Nov 17 2016, 01:11:57)
Type "copyright", "credits" or "license" for more information.
IPython 1.2.1 -- 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]: import pandas
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-d6ac987968b6> in <module>()
----> 1 import pandas
ImportError: No module named 'pandas'
どうすればこのような問題を回避するために、複数のバージョンのPythonを扱うことができますか?
'ls -l $(which ipython)'とは何ですか? –
[ipythonは間違ったpythonバージョンを読み込む可能性があります](https://stackoverflow.com/questions/9386048/ipython-reads-wrong-python-version) –