`poetry shell` and `poetry run` access different pip instances
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện sự khác biệt trong thiết lập với thư mục trống được mô tả trong issue bằng poetry install, poetry run pip --version và poetry shell, sau đó kiểm tra hành vi kích hoạt shell và biến môi trường được mô tả trong đó. Được xem là hoàn tất khi pip bên trong shell được tạo ra phân giải đến cùng một môi trường ảo và cùng một instance pip như poetry run pip, bao gồm cả đường dẫn which pip đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: macOS Big Sur 11.6.4 (20G417)
- Poetry version: 1.1.13
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/itcarroll/f46c6dbc6f53da88e7715f877be41452
Issue
I'm getting different pip instances depending on whether I use poetry run pip or start a new shell with poetry shell. The correct one is poetry run pip. The pip that poetry shell uses is wrong, and is not even at the path given by which pip. A clue might be that poetry shell has an extra environment variable also pointing to the wrong venv: __PYVENV_LAUNCHER__=/Users/icarroll/.local/pipx/venvs/poetry/bin/python.
Starting in an empty directory containing only pyproject.toml, here's what I'm seeing:
% poetry install
Creating virtualenv bug-report-f5FbZAGT-py3.8 in /Users/icarroll/Library/Caches/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (0.1s)
Writing lock file
% poetry run pip --version
pip 22.0.3 from /Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8/lib/python3.8/site-packages/pip (python 3.8)
% poetry shell
Spawning shell within /Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8
Restored session: Tue Mar 8 18:54:56 EST 2022
% . /Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8/bin/activate
(bug-report-f5FbZAGT-py3.8) % pip --version
pip 22.0.4 from /Users/icarroll/.local/pipx/shared/lib/python3.8/site-packages/pip (python 3.8)
(bug-report-f5FbZAGT-py3.8) % which pip
/Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8/bin/pip
- Ngôn ngữ chính
- Python
- Star
- 141
- Fork
- 10
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-poetry/poetry-plugin-shell
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
python-poetry/poetry-plugin-shell#43 · 1 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
python-poetry/poetry-plugin-shell#42 · 4 bình luận · 15 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
python-poetry/poetry-plugin-shell#40 · 4 bình luận · 2 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
python-poetry/poetry-plugin-shell#37 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
python-poetry/poetry-plugin-shell#34 · 1 bình luận ·
Tất cả issue của python-poetry/poetry-plugin-shell
Issue tương tự
-
fix(ui): serve bundled fonts from the gatewayCó thể đã có người làm @dkritarth đã nhận hôm nay. Đang mởagent: in-progress agent: ready P3 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dkritarth/scopewatch#336 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bob
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
khuisman/mcp-gee-sweet#1267 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-webui/open-webui#33285 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tv-list
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Gathin23/cleanyourtv#2337 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày