当前位置: 首页 > news >正文

UserWarning: Module “zipline.assets“ not found解决方法

问题描述:执行python程序提示警告无法执行成功,提示警告如下:

pyfolio\pos.py:25: UserWarning: Module "zipline.assets" not found; multipliers will not be applied to position notionals.

使用pip install zipline报错, 报错如下:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting ziplineDownloading https://pypi.tuna.tsinghua.edu.cn/packages/42/9b/5a55c79ca66e1c3ed2d94155cb71eb033eaf96cea71b81eb0579610d489f/zipline-1.4.1.tar.gz (5.4 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.4/5.4 MB 7.3 MB/s eta 0:00:00Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [26 lines of output]C:\Users\lenovo\AppData\Local\Temp\pip-install-n96fskvq\zipline_4d7d4374b02b491798eb064252b1724f\versioneer.py:587: SyntaxWarning: invalid escape sequence '\s'mo = re.search(r'=\s*"(.*)"', line)Traceback (most recent call last):File "<string>", line 2, in <module>exec(compile('''~~~~^^^^^^^^^^^^# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...<32 lines>...exec(compile(setup_py_code, filename, "exec"))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^''' % ('C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-n96fskvq\\zipline_4d7d4374b02b491798eb064252b1724f\\setup.py',), "<pip-setuptools-caller>", "exec"))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "<pip-setuptools-caller>", line 35, in <module>File "C:\Users\lenovo\AppData\Local\Temp\pip-install-n96fskvq\zipline_4d7d4374b02b491798eb064252b1724f\setup.py", line 268, in <module>version=versioneer.get_version(),~~~~~~~~~~~~~~~~~~~~~~^^File "C:\Users\lenovo\AppData\Local\Temp\pip-install-n96fskvq\zipline_4d7d4374b02b491798eb064252b1724f\versioneer.py", line 1405, in get_versionreturn get_versions()["version"]~~~~~~~~~~~~^^File "C:\Users\lenovo\AppData\Local\Temp\pip-install-n96fskvq\zipline_4d7d4374b02b491798eb064252b1724f\versioneer.py", line 1339, in get_versionscfg = get_config_from_root(root)File "C:\Users\lenovo\AppData\Local\Temp\pip-install-n96fskvq\zipline_4d7d4374b02b491798eb064252b1724f\versioneer.py", line 399, in get_config_from_rootparser = configparser.SafeConfigParser()^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed× Encountered error while generating package metadata.
╰─> See above for output.note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

问题原因:zipline包的问题,无法安装,类似pyfolio包的安装,报错亦一致,可参考pyfolio包安装错误解决方法-CSDN博客

解决方法:安装zipline-reloaded版,安装命令如下:

# pip安装命令
pip install zipline-reloaded# conda安装命令
conda install -c conda-forge zipline-reloaded

补充说明:假如以上方法安装成功后还会出现其它问题,请安装zipline仓库指定的python版本后重新安装,如python3.6版本 

http://www.lqws.cn/news/582499.html

相关文章:

  • 自由学习记录(65)
  • ThreadLocal、InheritableThreadLocal与TransmittableThreadLocal深度解析
  • 【Linux】网络基础
  • Git 常用命令、常用错误的总结
  • Kotlin空安全与异常处理
  • 国内Oracle大师认证
  • 深入比较 Gin 与 Beego:Go Web 框架的两大选择
  • 《燕云十六声》全栈技术架构深度解析
  • DFMEA检查表模板下载
  • js代码03
  • 第三十五章 I2S——音频传输接口
  • Reactor操作符的共享与复用
  • 回写缓存为何需要脏位?
  • Arduino IDE ESP8266连接0.96寸SSD1306 IIC单色屏显示北京时间
  • 2025年AI学习所感
  • 链表题解——两两交换链表中的节点【LeetCode】
  • 《Redis可扩展:轻松应对数据增长与流量高峰》
  • uni-app的生命周期
  • 云原生微服务架构搭建与部署全流程及样例
  • Spring Cloud Bus 和 Spring Cloud Stream
  • C语言main函数的原理:程序入口的奥秘
  • SpringCloud微服务 Eureka服务注册与发现
  • 从DeepMimic到带物理约束的MaskMimic——人形机器人全身运控的通用控制器:自此打通人类-动画-人形的训练路径
  • week1
  • WPF学习笔记(14)列表视图控件ListView与数据模板
  • demo01:基于 SpringMVC 的用户管理系统
  • Linux习题
  • 设计模式-观察者模式(发布订阅模式)
  • Redis 安装使用教程
  • RWKV-8 系列之 DeepEmbedAttention:精简 KV 缓存,尤其适合混合模型(RWKV-7s)