python找不到numpy模块

您所在的位置:网站首页 python没有numpy模块 python找不到numpy模块

python找不到numpy模块

#python找不到numpy模块| 来源: 网络整理| 查看: 265

现在,当我输入哪个python时,它显示/usr/local/bin/python。

但是,当我输入pip install numpy

它显示Requirement already satisfied (use --upgrade to upgrade): numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python.

因此,它们似乎位于不同的目录中,而且可能是我以前安装的numpy,这使得pip一直告诉我它们已经安装。我想知道这有什么办法吗?

更新,我已尝试导入它。import numpy

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named numpy

我也尝试卸载numpy并再次安装它。但是,当我卸载它时。它仍然给我错误。applematoMacBook-Air:~ apple$ pip uninstall numpy

DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.

Uninstalling numpy-1.8.0rc1:

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info

Proceed (y/n)? y

Exception:

Traceback (most recent call last):

File "/usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/basecommand.py", line 246, in main

status = self.run(options, args)

File "/usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/commands/uninstall.py", line 70, in run

requirement_set.uninstall(auto_confirm=options.yes)

File "/usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/req/req_set.py", line 274, in uninstall

req.uninstall(auto_confirm=auto_confirm)

File "/usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/req/req_install.py", line 730, in uninstall

paths_to_remove.remove(auto_confirm)

File "/usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/req/req_uninstall.py", line 126, in remove

renames(path, new_path)

File "/usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/utils/__init__.py", line 292, in renames

shutil.move(old, new)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move

os.unlink(src)

OSError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3