llamaindex setup

文章讲述了在Linux系统中遇到Poetry配置问题,如何通过pipx管理和更新Poetry版本,以及设置镜像源的过程。解决了一个版本冲突并确保全局访问权限。
摘要由CSDN通过智能技术生成

sudo apt install pipx

pipx install poetry

(llamaindex-39) gw00241401@gw00241401-pc:/data2/05_llamaindex/llama_index$ pipx install poetry
  installed package poetry 1.7.1, installed using Python 3.11.4
  These apps are now globally available
    - poetry
⚠️  Note: '/home/gw00241401/.local/bin' is not on your PATH environment variable. These apps will not be globally accessible until your PATH is updated. Run `pipx ensurepath` to
    automatically add it, or manually modify your PATH in your shell's config file (i.e. ~/.bashrc).
done! ✨ 🌟 ✨
 

poetry -V

The Poetry configuration is invalid

 - [source.0] Additional properties are not allowed ('priority' was unexpected)

版本有问题,比较低,可能是安装的poetry的路径,被系统默认的poetry给接胡了。

我发现用pipx list 查看,poetry 版本是1.7;但是poetry -V ,版本是1.3

whereis poetry

#output : /usr/bin/poetry

#将其文件删除或改名;

rm /usr/bin/poetry

#重新安装poetry

pipx uninstall poetry

pipx install poetry

poetry -V

#这时,显示版本是1.7

设置poetry 源:

[[tool.poetry.source]]
name = "ali"
url = "https://mirrors.aliyun.com/pypi/simple/"
priority = "primary"


[[tool.poetry.source]]
name = "tencent"
url = "https://mirrors.cloud.tencent.com/pypi/simple/"
priority = "primary"


[[tool.poetry.source]]
name = "tsinghua"
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/"
priority = "default"

参考:

Installation and Setup - LlamaIndex 🦙 0.9.38

  • 11
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值