导入本地python库时出错

时间:2018-03-17 03:53:15

标签: python python-2.7 jupyter-notebook

我想使用Jupyter-Nootbook导入本地python文件(lumapi.py)。我在Windows 10上安装了Python-2.7.14。

当我尝试导入源代码*时会显示此错误消息。

WindowsError                              Traceback (most recent call last)
<ipython-input-1-6b82ac779e5e> in <module>()
----> 1 import lumapi

C:\Program Files\Lumerical\FDTD\api\python\lumapi.py in <module>()
     97     return iapi
     98 
---> 99 iapi = initLib()
    100 
    101 class LumApiError(Exception):

C:\Program Files\Lumerical\FDTD\api\python\lumapi.py in initLib()
     54 
     55 def initLib():
---> 56     iapi = CDLL(INTEROPLIB)
     57 
     58     iapi.appOpen.restype = Session

C:\Users\Mohamed Mansour\Anaconda2\lib\ctypes\__init__.pyc in __init__(self, name, mode, handle, use_errno, use_last_error)
    364 
    365         if handle is None:
--> 366             self._handle = _dlopen(self._name, mode)
    367         else:
    368             self._handle = handle

WindowsError: [Error 126] The specified module could not be found

我试图用Anaconda自己解决这个问题。

>> pip install -f https://github.com/Illumina/interop/releases/latest interop
Requirement already satisfied: interop in c:\users\mohamed mansour\anaconda2\lib\site-packages
Requirement already satisfied: numpy>=1.13 in c:\users\mohamed mansour\anaconda2\lib\site-packages (from interop)
>> python -m interop --version
1.1.4
>> python -m interop --test
..............................
----------------------------------------------------------------------
Ran 30 tests in 0.300s

OK

问题仍然存在。知道如何解决这个错误吗?

*您可以查看此link的完整源代码。

0 个答案:

没有答案