Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Allow `--force` activate `poetry shell` when poetry fails to activate it

Đang mở
#14 5 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu với lệnh poetry shell và tái hiện đầu ra Virtual environment already activated được báo cáo trên Ubuntu. Theo dõi quyết định kích hoạt hiện có và xác định việc hoàn thành là một tùy chọn force để kích hoạt môi trường bất chấp phát hiện đó, với đầu ra khớp với ví dụ sử dụng được đề xuất.

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 (-vvv option).

  • OS version and name: Ubuntu 20.04

  • Poetry version: 1.1.13

Issue

Often times poetry keeps thinking I have a shell already activated, and I don't. This is widely reported by others too (#4622, python-poetry/poetry-plugin-shell#21, python-poetry/poetry#5050, python-poetry/poetry#3136). I also do not have any conda environment activated (not even base). In this case, I am just forced to use the full path to the venv to run the activate script manually. I propose that we should be able to do this in poetry, when it inevitable fails to activate the venv, to --force activate the environment, so that even if it is "already active" (not actually), it will still be "activated" (for the first time).

Current output

$ poetry shell -vvv
Using virtualenv: ...-py3.8
Virtual environment already activated: ...-py3.8

Proposed Usage example:

$ poetry shell
Virtual environment already activated: ...

$ poetry shell -f
Force-activating Virtual environment: ...
Ngôn ngữ chính
Python
Star
141
Fork
10
Merge trung bình
59 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python-poetry/poetry-plugin-shell

Tất cả issue của python-poetry/poetry-plugin-shell

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.