[英]zipline error. No module named zipline
I installed zipline package via Enthought Cantopy.我通过 Enthought Cantopy 安装了 zipline 包。 Now I try to run a script using it in command prompt, but get error
ImportError: No module named zipline
.现在我尝试在命令提示符下使用它运行一个脚本,但得到错误
ImportError: No module named zipline
。
I also tried to run the same code using IPython, with the same output.我还尝试使用 IPython 运行相同的代码,并具有相同的输出。
I think it is related to python virtual environments, but don't know how to fix that.我认为这与 python 虚拟环境有关,但不知道如何解决。
I figured it out.我想到了。 The problem was in the version of python I have.
问题出在我拥有的 python 版本中。 I have 32-bit python and Enthought Cantopy with 64 bit python, installed
zipline
package was under 64 bit python while command prompt was using 32 bit version.我有 32 位 python 和带有 64 位 python 的 Enthought Cantopy,安装的
zipline
包在 64 位 python 下,而命令提示符使用 32 位版本。 Installing 64 bit python fixed the issue.安装 64 位 python 解决了这个问题。
These are the Requirements/ Steps to Make Zipline Work:这些是使 Zipline 工作的要求/步骤:
$conda create -n python34 python=3.4 anaconda
(replace py34 with the location of python34 folder)$conda create -n python34 python=3.4 anaconda
(将 py34 替换为 python34 文件夹的位置)$activate python34
#Activates the python 3.4 environment$activate python34
#Activates the python 3.4 environment$pip install -e C:\\GitHub\\zipline
(Directory where you extracted zipline) $pip install -e C:\\GitHub\\zipline
(解压zipline的目录)$zipline ingest
$zipline ingest
数据$zipline ingest
zipline ingest Hope this helps others who visit this page!希望这对访问此页面的其他人有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.