python - 如何使用 Poetry 安装 Tweepy?
问题描述
当我尝试通过运行此命令进行安装时poetry add tweepy
,它返回此错误:
(base) angellanaigaga@Angellas-MBP plugin-template % poetry add tweepy
Using version ^3.10.0 for tweepy
Updating dependencies
Resolving dependencies... (13.6s)
CalledProcessError
Command '['git', '--git-dir', '/var/folders/pt/17xvwz550hx9hkhw2wv0zpbr0000gn/T/pypoetry-git-wr1sgu4u/.git', '--work-tree', '/var/folders/pt/17xvwz550hx9hkhw2wv0zpbr0000gn/T/pypoetry-git-wr1sgu4u', 'checkout', 'demo']' returned non-zero exit status 1.
at ~/opt/anaconda3/lib/python3.8/site-packages/poetry/utils/_compat.py:217 in run
213│ process.wait()
214│ raise
215│ retcode = process.poll()
216│ if check and retcode:
→ 217│ raise CalledProcessError(
218│ retcode, process.args, output=stdout, stderr=stderr
219│ )
220│ finally:
221│ # None because our context manager __exit__ does not use them.
解决方案
我无法重现这个:
>poetry add tweepy
Using version ^3.10.0 for tweepy
Updating dependencies
Resolving dependencies...
Writing lock file
Package operations: 12 installs, 0 updates, 0 removals
• Installing oauthlib (3.1.1)
• Installing pysocks (1.7.1)
• Installing atomicwrites (1.4.0)
• Installing attrs (21.2.0)
• Installing more-itertools (8.8.0)
• Installing py (1.10.0)
• Installing colorama (0.4.4)
• Installing pluggy (0.13.1)
• Installing wcwidth (0.2.5)
• Installing requests-oauthlib (1.3.0)
• Installing pytest (5.4.3)
• Installing tweepy (3.10.0)
这似乎是您项目的其他依赖项之一的问题。
据我所知,它似乎正在尝试安装一个(可能是无名的?) git 依赖项的demo
分支,该分支可能不存在。
没有看到你的 pyproject.toml 就很难确定更多。
推荐阅读
- javascript - 承诺返回 null
- lua - lua 中的 C# 中的“goto”循环是否有等价物?(必须兼容Love2D)
- build - QBS:qbs.buildVariant 和 qbs.configurationName 有什么区别?
- php - codeigniter 保存任何事务
- ruby-on-rails - Rails 5 设计不保存嵌套属性
- python-3.x - 使用 matplotlib 选择网格覆盖的坐标系
- javascript - 如何根据类别对产品进行排序
- sockets - 如何关闭等待服务器套接字侦听的任务?
- bitmap - 如何在文件中存储不同的位长度?
- python - 使用另一个列表中的键聚合一个列表