简体   繁体   English

在Python 3.4中安装zipline时出错

[英]Error in installing zipline in Python 3.4

I need your help to install zipline. 我需要您的帮助来安装zipline。

I am beginner in Python coding but I faced with huge barrier now... I tried to zipline in my python and I followed below process. 我是Python编码的初学者,但现在遇到了巨大的障碍...我尝试在python中使用zipline并遵循以下过程。

  1. my python version is 3.6 but zipline supports 2.7 and 3.4. 我的python版本是3.6,但zipline支持2.7和3.4。 So I installed 3.4 python like below: conda create -n previous python =3.4.1 anaconda 所以我安装了3.4 python,如下所示:conda create -n previous python = 3.4.1 anaconda

In addition, I installed visual C++ 2010. 此外,我安装了Visual C ++ 2010。

  1. activate previous 激活上一个
  2. pip install zipline 点安装zipline

But my computer still shows below error message. 但是我的计算机仍然显示以下错误消息。 I am not sure how to install zipline and solve this error. 我不确定如何安装zipline并解决此错误。 My computer is window 7, intelcore i7-4712 64bit and I installed anaconda 4.0.0(32bit) 我的电脑是Windows 7,intelcore i7-4712 64位,并且我安装了anaconda 4.0.0(32位)


(C:\\Anaconda3) C:\\Users\\sktsuser>activate previous (C:\\ Anaconda3)C:\\ Users \\ sktsuser>激活上一个

(previous) C:\\Users\\sktsuser>python --version Python 3.4.1 :: Anaconda 2.1.0 (32-bit) (上一个)C:\\ Users \\ sktsuser> python --version Python 3.4.1 :: Anaconda 2.1.0(32位)

(previous) C:\\Users\\sktsuser>pip install zipline (上一个)C:\\ Users \\ sktsuser> pip install zipline

File "C:\\Anaconda3\\envs\\previous\\lib\\site-packages\\setuptools-5.8-py3.4.egg\\se tuptools\\command\\easy_install.py", line 1043, in run_setup 在run_setup的第1043行中,文件“ C:\\ Anaconda3 \\ envs \\ previous \\ lib \\ site-packages \\ setuptools-5.8-py3.4.egg \\ se tuptools \\ command \\ easy_install.py”

distutils.errors.DistutilsError: Setup script exited with error: command 'C:\\An aconda3\\mingw\\bin\\gcc.exe' failed with exit status 1 distutils.errors.DistutilsError:安装脚本退出,错误:命令'C:\\ aconda3 \\ mingw \\ bin \\ gcc.exe'失败,退出状态为1


Cleaning up... Command python setup.py egg_info failed with error code 1 in C:\\Users\\sktsuser\\A ppData\\Local\\Temp\\pip_build_sktsuser\\zipline Storing debug log for failure in C:\\Users\\sktsuser\\pip\\pip.log 清理...命令python setup.py egg_info在C:\\ Users \\ sktsuser \\ A ppData \\ Local \\ Temp \\ pip_build_sktsuser \\ zipline中失败,错误代码为1,在C:\\ Users \\ sktsuser \\ pip \\ pip中存储失败的调试日志.log

(previous) C:\\Users\\sktsuser> (上一个)C:\\ Users \\ sktsuser>

尝试将conda安装与Quantopian源(而不是pip)一起使用,如下所示:

conda install -c Quantopian zipline

That is one of the main reasons they recommend you to use virtualenv. 这是他们建议您使用virtualenv的主要原因之一。

Here they have some details how to install using virtualenv 在这里,他们有一些详细信息如何使用virtualenv安装

http://www.zipline.io/development-guidelines.html http://www.zipline.io/development-guidelines.html

$ mkvirtualenv zipline
$ ./etc/ordered_pip.sh ./etc/requirements.txt
$ pip install -r ./etc/requirements_dev.txt
$ pip install -r ./etc/requirements_blaze.txt

Note for this you need to checkout their source code or the requirements.txt from github: https://github.com/quantopian/zipline/tree/master/etc 请注意,您需要从github签出它们的源代码或requirements.txt: https : //github.com/quantopian/zipline/tree/master/etc

That way you can create a virtual env with the right python needed by zipline 这样,您就可以使用zipline所需的正确python创建虚拟环境

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM