我使用conda安装了NanoStat,但是每当我尝试运行它时,都会出现以下错误。我读过多个线程,但似乎无法解决此问题。
似乎它试图从不在conda内的目录中调用numpy。
如何使其在/hb/groups/bernardi_lab/programs/miniconda3/pkgs/
中搜索numpy。
错误:
Traceback (most recent call last):
File "/opt/ohpc/pub/libs/gnu/numpy/1.12.1/lib64/python2.7/site-packages/numpy/core/__init__.py", line 16, in <module>
from . import multiarray
ImportError: dynamic module does not define module export function (PyInit_multiarray)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/hb/groups/bernardi_lab/programs/miniconda3/envs/nanostat/bin/NanoStat", line 6, in <module>
from nanostat.NanoStat import main
File "/hb/groups/bernardi_lab/programs/miniconda3/envs/nanostat/lib/python3.7/site-packages/nanostat/NanoStat.py", line 33, in <module>
from nanomath import write_stats
File "/hb/groups/bernardi_lab/programs/miniconda3/envs/nanostat/lib/python3.7/site-packages/nanomath/__init__.py", line 1, in <module>
from .nanomath import *
File "/hb/groups/bernardi_lab/programs/miniconda3/envs/nanostat/lib/python3.7/site-packages/nanomath/nanomath.py", line 22, in <module>
import numpy as np
File "/opt/ohpc/pub/libs/gnu/numpy/1.12.1/lib64/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
from . import add_newdocs
File "/opt/ohpc/pub/libs/gnu/numpy/1.12.1/lib64/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/opt/ohpc/pub/libs/gnu/numpy/1.12.1/lib64/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/opt/ohpc/pub/libs/gnu/numpy/1.12.1/lib64/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/opt/ohpc/pub/libs/gnu/numpy/1.12.1/lib64/python2.7/site-packages/numpy/core/__init__.py", line 24, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
我尝试卸载并安装nanostat和numpy,但似乎遇到了同样的问题。
当我使用conda list
在我的环境中搜索numpy时,它的确显示了python 3.7的numpy。
(nanostat) [rgatins@hummingbird Big_Files]$ conda list | grep numpy
numpy 1.18.1 py37h4f9e942_0
numpy-base 1.18.1 py37hde5b4d6_1
但是运行命令时,它似乎正在使用python 2.7捕获不同版本的numpy。
关于如何解决此问题的任何建议?
谢谢!