terminal和pycharm terminal中的python版本差异

terminal和pycharm terminal中的python版本差异,python,matplotlib,Python,Matplotlib,我使用OX10.11.3,在终端中键入python时,我得到: $ python Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 12:54:16) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. 因此matplotlib版本是: print

我使用OX10.11.3,在终端中键入python时,我得到:

$ python
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 12:54:16) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
因此matplotlib版本是:

print matplotlib.__version__
1.5.1
print matplotlib.__version__
1.1.1
然而,在pycharm终端中,我看到:

Python 2.6.9 (unknown, Oct 23 2015, 18:05:10) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
因此matplotlib版本是:

print matplotlib.__version__
1.5.1
print matplotlib.__version__
1.1.1

我需要使用最新版本中存在的matplotlib的一些功能,但我不知道如何更新它。我的python有哪些不同之处?

您需要在pycharm中更改项目解释器。这些文件非常详尽


也可以考虑使用像VirtualEnv这样的东西,因为它有助于避免类似这样的问题

,显然你在PyCharm使用了一个不同的解释器和环境——转到项目解释器设置来改变这一点,并在“虚拟环境”上阅读。