一、介绍
使用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