找不到模块:zipline导入

时间:2018-08-01 11:37:03

标签: python module zipline

从行中获取以下堆栈跟踪:

import zipline

Traceback (most recent call last):

   File "C:\Users\dan gilmore\Desktop\EclipseOxygen64WCSPlugin\cherryPY\tutorials\zip.py", line 1, in <module>
    import zipline
   File "C:\Users\dan gilmore\AppData\Local\Programs\Python\Python36-32\lib\site-packages\zipline\__init__.py", line 21, in <module>
    from trading_calendars import get_calendar
ModuleNotFoundError: No module named 'trading_calendars'

在尝试下载模块“交易日历”(我检查过相同的模块)后,我从命令行得到了跟随错误:

C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD "-Ic:\users\dan_gilmore\appdata\local\
programs\python\python36-32\include" "-Ic:\users\dan_gilmore\appdata\local\programs\python\python36-32\
include" "-IC:\Program Files (x86)\Microsoft Visual_Studio\2017\Community\
VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows_Kits\
NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows_Kits\
8.1\include\\shared" "-IC:\Program Files (x86)\Windows_Kits\
8.1\include\\um" "-IC:\Program Files (x86)\Windows_Kits\8.1\include\
\winrt" /Tclru.c /Fobuild\temp.win32-3.6\Release\lru.obj
lru.c
c:\users\dan gilmore\appdata\local\programs\python\python36-32\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

1 个答案:

答案 0 :(得分:0)

由于存在multiple versions of python,因此出现了问题。使用python -m pip install <packages>仓库中的zipline/zipline命令,我能够在python shell中成功执行import zipline