如何改变与numbapro模块相关的路径?

时间:2015-03-22 18:39:25

标签: python anaconda numba-pro

我正在尝试运行导入numbapro的Python脚本,并且我一直在获取站点包位置的错误路径。当我从交互式命令行导入numbapro时,我没有任何问题,但当我尝试从spyder,PyCharm或提示符运行此演示脚本时:

from numbapro import int32, float32
print(int32[:])           # 1D int32 array
print(float32[:,:])       # 2D float32 array
print(int32[:,:,:,:])     # 4D int32 array

我收到此错误:

/home/XXX/anaconda/bin/python 

/home/XXX/workspace/XXX/numba.py
Traceback (most recent call last):
  File "/home/XXX/workspace/XXX/numba.py", line 1, in <module>
    from numbapro import int32, float32
  File "/opt/anaconda1anaconda2anaconda3/lib/python2.7/site-packages/numbapro/__init__.py", line 8, in <module>
    #
  File "/home/XXX/workspace/XXX/numba.py", line 1, in <module>
    from numbapro import int32, float32
ImportError: cannot import name int32

Process finished with exit code 1

出于某种原因,当numbapro site-package实际位于默认的anaconda site-packages位置时,它会继续出现在/ opt / ...目录中。任何帮助将不胜感激。我的环境是Ubuntu 14.10,Python 2.7和Anaconda 2.1.0。

0 个答案:

没有答案