0

当我尝试使用此命令行运行此 python 代码时:

~/Tools/find_differential_primers/utils pythonstitch_six_frame_stops.py seq.fa

错误代码将显示如下。你能帮我解决这个问题吗?

Traceback (most recent call last):
  File "stitch_six_frame_stops.py", line 55, in <module>
    import matplotlib
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.x-py2.7-macosx-10.8 intel.egg/matplotlib/__init__.py", line 129, in <module>
    from matplotlib.cbook import is_string_like
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.x-py2.7-macosx-10.8-intel.egg/matplotlib/cbook.py", line 28, in <module>
    import numpy as np
  File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/__init__.py", line 140, in <module>
    from . import add_newdocs
  File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/lib/__init__.py", line 6, in <module>
    from .type_check import *
  File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/core/__init__.py", line 6, in <module>
    from . import multiarray
ImportError: /usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/core/multiarray.so: invalid ELF header
4

1 回答 1

1

您正在尝试在 Mac OSX 中使用 .so 文件!.so文件在 Linux 上工作;Mac OSX 可以处理.dynld文件。您可能想要验证您的 NumPy 安装。

假设您使用的是 OSX Lion,请参阅此处了解如何在 OSX 上安装 NumPy。

于 2013-08-21T03:55:28.047 回答