poetry shell cannot work
还没有人认领这个 Issue。
评估
调研方向
首先在使用 Anaconda 的 Windows 上复现列出的 poetry new、conda activation、poetry run 和 poetry shell 命令,然后比较显示环境已激活的详细运行时日志。检查插件对 Windows shell 的处理,并在 poetry shell 不再报告缺少 activate.bat 命令且打开预期的 shell 时验证完成情况。
由索引模型根据 Issue 内容生成。
描述
Description
I try to run code from https://python-poetry.org/docs/basic-usage/#using-poetry-run, but it reports error...
poetry new project
cd project
conda activate your_env_name
which python
poetry run which python
poetry shell
which python
C:\Users\Administrator\Personal_scripts\Python\PythonScripts\ddd\poetry-demo>activate python312
(python312) C:\Users\Administrator\Personal_scripts\Python\PythonScripts\ddd\poetry-demo>which python
/c/ProgramData/anaconda3/envs/python312/python
(python312) C:\Users\Administrator\Personal_scripts\Python\PythonScripts\ddd\poetry-demo>poetry run which python
/c/ProgramData/anaconda3/envs/python312/python
(python312) C:\Users\Administrator\Personal_scripts\Python\PythonScripts\ddd\poetry-demo>poetry shell
Spawning shell within C:\ProgramData\anaconda3\envs\python312
'C:\ProgramData\anaconda3\envs\python312\Scripts\activate.bat' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
(python312) C:\Users\Administrator\Personal_scripts\Python\PythonScripts\ddd\poetry-demo>
不是内部或外部命令,也不是可运行的程序
或批处理文件。
It's mean: It is not an internal or external command, nor is it a runnable program
Or batch file.
Workarounds
No....
Poetry Installation Method
system package manager (eg: dnf, apt etc.)
Operating System
Win10 Enterprise 21H2
Poetry Version
1.8.3
Poetry Configuration
(python312) C:\ProgramData\anaconda3\envs\python312>poetry config --list
cache-dir = "C:\\Users\\Administrator\\AppData\\Local\\pypoetry\\Cache"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}\\virtualenvs" # C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true
Python Sysconfig
(python312) C:\ProgramData\anaconda3\envs\python312>python -m sysconfig
Platform: "win-amd64"
Python version: "3.12"
Current installation scheme: "nt"
Paths:
data = "C:\ProgramData\anaconda3\envs\python312"
include = "C:\ProgramData\anaconda3\envs\python312\Include"
platinclude = "C:\ProgramData\anaconda3\envs\python312\Include"
platlib = "C:\ProgramData\anaconda3\envs\python312\Lib\site-packages"
platstdlib = "C:\ProgramData\anaconda3\envs\python312\Lib"
purelib = "C:\ProgramData\anaconda3\envs\python312\Lib\site-packages"
scripts = "C:\ProgramData\anaconda3\envs\python312\Scripts"
stdlib = "C:\ProgramData\anaconda3\envs\python312\Lib"
Variables:
BINDIR = "C:\ProgramData\anaconda3\envs\python312"
BINLIBDEST = "C:\ProgramData\anaconda3\envs\python312\Lib"
EXE = ".exe"
EXT_SUFFIX = ".cp312-win_amd64.pyd"
INCLUDEPY = "C:\ProgramData\anaconda3\envs\python312\Include"
LIBDEST = "C:\ProgramData\anaconda3\envs\python312\Lib"
TZPATH = "C:\ProgramData\anaconda3\envs\python312\share\zoneinfo"
VERSION = "312"
VPATH = "..\.."
abiflags = ""
base = "C:\ProgramData\anaconda3\envs\python312"
exec_prefix = "C:\ProgramData\anaconda3\envs\python312"
installed_base = "C:\ProgramData\anaconda3\envs\python312"
installed_platbase = "C:\ProgramData\anaconda3\envs\python312"
platbase = "C:\ProgramData\anaconda3\envs\python312"
platlibdir = "DLLs"
prefix = "C:\ProgramData\anaconda3\envs\python312"
projectbase = "C:\ProgramData\anaconda3\envs\python312"
py_version = "3.12.0"
py_version_nodot = "312"
py_version_nodot_plat = "312"
py_version_short = "3.12"
srcdir = "C:\ProgramData\anaconda3\envs\python312"
userbase = "C:\Users\Administrator\AppData\Roaming\Python"
Example pyproject.toml
No response
Poetry Runtime Logs
(python312) C:\Users\Administrator\Personal_scripts\Python\PythonScripts\ddd\poetry-demo>poetry -vvv shell
Loading configuration file C:\Users\Administrator\AppData\Roaming\pypoetry\config.toml
Using virtualenv: C:\ProgramData\anaconda3\envs\python312
Virtual environment already activated: C:\ProgramData\anaconda3\envs\python312
- 主要语言
- Python
- 星标
- 141
- 派生
- 10
- 平均合并
- 59 分钟
- 30 天内合并 PR
- 3
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-poetry/poetry-plugin-shell 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 20/100
python-poetry/poetry-plugin-shell#43 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 52/100
python-poetry/poetry-plugin-shell#42 · 4 条评论 · 15 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 38/100
python-poetry/poetry-plugin-shell#40 · 4 条评论 · 2 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 42/100
python-poetry/poetry-plugin-shell#37 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 25/100
python-poetry/poetry-plugin-shell#34 · 1 条评论 ·
查看 python-poetry/poetry-plugin-shell 的全部 Issue
相似的 Issue
-
ACK_WAITING HELP_WANTED UPDATE_CS
难度 2/5 1-3 小时 新手友好度 78/100
OWASP/CheatSheetSeries#2458 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
BasedHardware/omi#19711 ·
维护者通常 1 天内回复
-
Qwen3_5MoeModel no longer returns router_logits, breaking aux loss with output_router_logits=True未关闭
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/transformers#49172 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
vllm-project/vllm-metal#885 ·
维护者通常 1 天内回复