Windows10 Python安装poetry

一、介绍

使用python的时候提示没有可执行poetry,遂查找全网尝试安装。

我使用的pipx安装,本来打算用PowerShell,但是进度一直不动,没有解决这个问题所以换了方法。下面是我安装的步骤

二、安装

1.win+r打开运行窗口,输入cmd打开控制台

pip install pipx

2.pipx安装成功后,运行下面代码安装poetry

pipx install poetry

3.出现下面则安装成功

C:\Users\ASUS>pipx install poetry
  installed package poetry 1.8.3, installed using Python 3.8.8
  These apps are now globally available
    - poetry.exe
⚠️  Note: 'C:\Users\ASUS\.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 (e.g. ~/.bashrc).
done! ✨ 🌟 ✨

4.配置环境变量

1)win+r+cmd打开控制台,获取路径

where poetry

得到 

路径就是C:\Users\<你的用户名>\.local\bin

2)win+q搜索“编辑环境变量”点击打开。

①环境变量->系统变量->点击Path

②新建->j输入刚刚得到的路径,点击确定保存

5.在PowerShell中查看poetry版本号,

poetry -V

出现版本信息安装成功

注:安装版本1.8.3需要python>=3.9

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值