2012-09-17 36 views
3

今天我得到了一個奇怪的錯誤。我試圖導入ipython在Windows 7下的網絡驅動器中的numpy,它失敗,並出現以下錯誤。ipython在網絡驅動器上導入numpy失敗

In [1]: import numpy 
--------------------------------------------------------------------------- 
ImportError        Traceback (most recent call last) 
Z:\<ipython-input-1-5a0bd626bb1d> in <module>() 
----> 1 import numpy 

C:\Python27\lib\site-packages\numpy\__init__.pyc in <module>() 
    141   return loader(*packages, **options) 
    142 
--> 143  import add_newdocs 
    144  __all__ = ['add_newdocs'] 
    145 

C:\Python27\lib\site-packages\numpy\add_newdocs.py in <module>() 
     7 #  core/fromnumeric.py, core/defmatrix.py up-to-date. 

     8 
----> 9 from numpy.lib import add_newdoc 
    10 
    11 ######################################################################## 
####### 


C:\Python27\lib\site-packages\numpy\lib\__init__.py in <module>() 
    11 
    12 import scimath as emath 
---> 13 from polynomial import * 
    14 #import convertcode 

    15 from utils import * 

C:\Python27\lib\site-packages\numpy\lib\polynomial.py in <module>() 
    15 from numpy.lib.function_base import trim_zeros, sort_complex 
    16 from numpy.lib.type_check import iscomplex, real, imag 
---> 17 from numpy.linalg import eigvals, lstsq 
    18 
    19 class RankWarning(UserWarning): 

C:\Python27\lib\site-packages\numpy\linalg\__init__.py in <module>() 
    46 from info import __doc__ 
    47 
---> 48 from linalg import * 
    49 
    50 from numpy.testing import Tester 

C:\Python27\lib\site-packages\numpy\linalg\linalg.py in <module>() 
    21   isfinite, size, finfo, absolute, log, exp 
    22 from numpy.lib import triu 
---> 23 from numpy.linalg import lapack_lite 
    24 from numpy.matrixlib.defmatrix import matrix_power 
    25 from numpy.compat import asbytes 

ImportError: DLL load failed: The specified path is invalid. 

使用原始的python shell以及在C:\ drive上使用ipython。我試圖重新安裝ipython並嘗試不同的版本,但錯誤依然存在。我不知道這是什麼原因,所以任何幫助表示讚賞。

回答

0

我有一個類似的問題,numpy和linalg。我通過卸載numpy來修復它

pip uninstall numpy 

然後重新安裝。

pip install numpy 

我沒有從共享驅動器做到這一點,我從我的本地驅動器做到了這一點。