zipline RLock问题

时间:2018-06-06 19:11:25

标签: python anaconda conda zipline

我已使用zipline成功下载了conda但是当我尝试将其导入jupyter笔记本中的程序时,我一直收到此错误。我对zipline比较新,所以如果解决方案很明显,请原谅我。请告知我无法在任何地方找到解决方案,quantopian说这是一个anaconda,而不是zipline问题。

错误:

    ~\Anaconda3\lib\site-packages\logbook\concurrency.py in <module>()
     29 
     30 if has_gevent:
---> 31     from gevent._threading import (Lock as ThreadLock,
     32                                    RLock as ThreadRLock,
     33                                    get_ident as 

thread_get_ident,

ImportError: cannot import name 'RLock

Successful install ==>
Solving environment: |
Warning: 4 possible package resolutions (only showing differing packages):
  - anaconda::ca-certificates-2018.03.07-0, anaconda::openssl-1.0.2o-h8ea7d77_0
  - anaconda::ca-certificates-2018.03.07-0, defaults::openssl-1.0.2o-h8ea7d77_0
  - anaconda::openssl-1.0.2o-h8ea7d77_0, defaults::ca-certificates-2018.03.07-0
  - defaults::ca-certificates-2018.03.07-0, defaults::openssl-1.0.2o-h8ea7d77done

注意:已安装所有请求的软件包。

1 个答案:

答案 0 :(得分:0)

此解决方案对我不起作用,但对其他人却起作用。 tl; dr更新IntsArray.asIntsList并卸载logbookhttps://github.com/quantopian/zipline/issues/2208

gevent

原来我的问题是基本的环境处理。我已经用python 3.5版安装了conda env,但是默认安装的ipython使用python 2.7版。解决方案:

=== My solution ===

然后运行示例不会引发错误:

conda install ipython