Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在python(Mac)上安装模块时遇到问题_Python_Macos_Module_Pip - Fatal编程技术网

在python(Mac)上安装模块时遇到问题

在python(Mac)上安装模块时遇到问题,python,macos,module,pip,Python,Macos,Module,Pip,我对使用pip在Python上安装模块有点陌生。我相信我已经安装了pip,但是当我尝试使用我尝试使用pip安装的模块时,它说没有这样的模块。我将发布终端响应,看看发生了什么。如果有人能让我知道我在安装模块时出错,我将不胜感激,谢谢你抽出时间 faizrahman@138-38-186-80 ~ % sudo pip install matplotlib Password: DEPRECATION: Python 2.7 reached the end of its life on January

我对使用pip在Python上安装模块有点陌生。我相信我已经安装了pip,但是当我尝试使用我尝试使用pip安装的模块时,它说没有这样的模块。我将发布终端响应,看看发生了什么。如果有人能让我知道我在安装模块时出错,我将不胜感激,谢谢你抽出时间

faizrahman@138-38-186-80 ~ % sudo pip install matplotlib
Password:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: The directory '/Users/faizrahman/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: matplotlib in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.3.1)
Requirement already satisfied: numpy>=1.5 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (1.8.0rc1)
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (1.5)
Requirement already satisfied: tornado in /Library/Python/2.7/site-packages (from matplotlib) (5.1.1)
Requirement already satisfied: pyparsing>=1.5.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (2.0.1)
Requirement already satisfied: nose in /Library/Python/2.7/site-packages (from matplotlib) (1.3.7)
Requirement already satisfied: singledispatch in /Library/Python/2.7/site-packages (from tornado->matplotlib) (3.4.0.3)
Requirement already satisfied: futures in /Library/Python/2.7/site-packages (from tornado->matplotlib) (3.3.0)
Requirement already satisfied: backports-abc>=0.4 in /Library/Python/2.7/site-packages (from tornado->matplotlib) (0.5)
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado->matplotlib) (1.12.0)
faizrahman@138-38-186-80 ~ % 



您需要从python3调用pip:
sudo python3-m pip install matplotlib

您的机器上安装了哪些版本的python?您使用什么特定的python版本来加载模块<代码>python--版本