如何解决Numpy 无法访问其库 HPC 环境模块
我已经使用
安装了numpysudo pip install -I --prefix=/soft/bin/system/python/3.7.4 numpy
我现在可以导入 numpy 但 numpy 不能访问它的任何属性。
我不知道要在路径/配置中设置什么才能使其正常工作。
我在加载模块 python3.7.4 时尝试设置
prepend-path PATH /soft/bin/system/python/3.7.4/bin
prepend-path LD_LIBRARY_PATH /soft/bin/system/python/3.7.4/lib/:/soft/bin/system/python/3.7.4/lib/:/soft/bin/system/python/3.7.4/lib/python3.7/site-packages/
setenv PYTHONPATH /soft/bin/system/python/3.7.4/lib/python3.7/site-packages
但没有任何效果,现在已经 2 天了。
bioinfo@frontal:~$ python -c 'import numpy; numpy.test("full");'
Traceback (most recent call last):
File "<string>",line 1,in <module>
AttributeError: module 'numpy' has no attribute 'test'
bioinfo@frontal:~$ which python
/soft/bin/system/python/3.7.4/bin/python
bioinfo@tao:~$ python -c 'import numpy; numpy.sin;'
Traceback (most recent call last):
File "/soft/bin/system/python/3.7.4/lib/python3.8/site-packages/numpy/core/__init__.py",line 22,in <module>
from . import multiarray
File "/soft/bin/system/python/3.7.4/lib/python3.8/site-packages/numpy/core/multiarray.py",line 12,in <module>
from . import overrides
File "/soft/bin/system/python/3.7.4/lib/python3.8/site-packages/numpy/core/overrides.py",line 7,in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception,another exception occurred:
Traceback (most recent call last):
File "<string>",in <module>
File "/soft/bin/system/python/3.7.4/lib/python3.8/site-packages/numpy/__init__.py",line 145,in <module>
from . import core
File "/soft/bin/system/python/3.7.4/lib/python3.8/site-packages/numpy/core/__init__.py",line 48,in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions Failed. This error can happen for
many reasons,often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: python3.9 from "/soft/bin/system/python/3.9/bin/python"
* The NumPy version is: "1.20.3"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
进一步调查 在文件夹中
/soft/bin/system/python/3.7.4/lib/python3.8/site-packages/numpy/core
_multiarray_umath.cpython-38-x86_64-linux-gnu.so
为什么没有找到,是名字没问题还是用pip安装的错误?
解决方法
我在 2.12.0 中用奇点更新了 trinityrnaseq(使用 NumPy 的主要工具)并且一切正常。
代表问题作者添加。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。