Python 为什么会出现此segdault导入numpy错误?

Python 为什么会出现此segdault导入numpy错误?,python,numpy,Python,Numpy,当我尝试导入numpy时,会出现一些很长的错误,这给了我尝试解决问题的指示 我通读了一遍并尝试了解决方案,但没有一个奏效。我只想进口numpy import numpy 错误: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/numpy/core/__init__.py", line 40, in <module> File "/usr/local/lib/python

当我尝试导入numpy时,会出现一些很长的错误,这给了我尝试解决问题的指示

我通读了一遍并尝试了解决方案,但没有一个奏效。我只想进口numpy

import numpy

错误:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/numpy/core/__init__.py", line 40, in <module>
File "/usr/local/lib/python3.7/site-packages/numpy/core/multiarray.py", line 12, in <module>
File "/usr/local/lib/python3.7/site-packages/numpy/core/overrides.py", line , in <module>
ImportError: PyCapsule_Import could not import module "datetime"

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Solution.py", line 1, in <module>
import numpy
File "/usr/local/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
File "/usr/local/lib/python3.7/site-packages/numpy/core/__init__.py", line 71, in <module>
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
22(removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
1. Check that you are using the Python you expect (you're using /usr/local/bin/python3),
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy versions you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
 how you installed Python
 how you installed numpy
 your operating system
 whether or not you have multiple versions of Python installed
 if you built from source, your compiler versions and ideally a build log

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/python3.7/site packages/numpy/core/_init__.py”,第40行,在
文件“/usr/local/lib/python3.7/site packages/numpy/core/multiarray.py”,第12行,在
文件“/usr/local/lib/python3.7/site packages/numpy/core/overrides.py”,第行,在
ImportError:PyCapsule\u导入无法导入模块“datetime”
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“Solution.py”,第1行,在
进口numpy
文件“/usr/local/lib/python3.7/site packages/numpy/_init__.py”,第142行,在
文件“/usr/local/lib/python3.7/site packages/numpy/core/_init__.py”,第71行,在
进口恐怖主义:
重要提示:请阅读本文,了解如何解决此问题的建议!
导入多数组numpy扩展模块失败。最
您可能正在尝试导入失败的numpy版本。
以下是如何继续:
-如果您正在使用numpy git存储库,请尝试使用`git clean-xdf`
22(删除所有不受版本控制的文件)并重新生成numpy。
-如果您只是尝试使用已安装的numpy版本:
您的安装已中断-请重新安装numpy。
-如果您已经重新安装,但没有解决问题,则:

1.检查您是否正在使用预期的Python(您正在使用/usr/local/bin/python3), 在你的路径或PYTHONPATH中没有可以 干扰您尝试使用的Python和numpy版本。 2.如果(1)看起来不错,您可以在 https://github.com/numpy/numpy/issues. 请详细说明: 您是如何安装Python的 你是如何安装numpy的 您的操作系统 是否安装了多个版本的Python 如果您是从源代码构建的,那么您的编译器版本和理想情况下的构建日志 注意:这个错误有很多可能的原因,所以请不要评论 关于此的现有问题-打开一个新的。
原始错误是:PyCapsule\u导入无法导入模块“datetime”


另外,当我运行任何numpy函数时,我得到一个分段错误,这意味着什么?有任何修复吗?

Update=我尝试从numpy导入数组使用该函数,这是我将使用的唯一一个函数,而不是导入整个库,但产生了相同的长错误我按照说明重新安装了numpy,但没有修复问题我没有使用git repository并希望理解这一行:检查您使用的是预期的Python(您使用的是/usr/local/bin/python3),并且您的路径或PYTHONPATH中没有目录会干扰您尝试的Python和numpy版本。这意味着什么?你使用的是像康达一样的py分布吗?