【问题标题】:zipline RLock issuezipline RLock 问题
【发布时间】:2018-06-06 19:11:25
【问题描述】:

我已经使用conda 成功下载了zipline,但是当我尝试将其导入jupyter notebook 中的程序时,我不断收到此错误。我对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

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

【问题讨论】:

    标签: python anaconda conda zipline


    【解决方案1】:

    此解决方案对我不起作用,但对其他人确实有效。 tl;博士更新logbook 并卸载geventhttps://github.com/quantopian/zipline/issues/2208

    === My solution ===
    

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

    conda install ipython
    

    那么运行一个例子就不会报错:

    cd zipline/examples
    ipython
    %run buyapple.py
    

    【讨论】:

      猜你喜欢
      • 2016-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-18
      相关资源
      最近更新 更多