Skip to content

nushell: poetry shell does not activate virtualenv #7228

@dead10ck

Description

@dead10ck
  • Poetry version: Poetry (version 1.3.1)
  • Python version:
    ❯ : poetry debug info
    Poetry
    Version: 1.3.1
    Python:  3.11.0
    
    Virtualenv
    Python:         3.11.0
    Implementation: CPython
    Path:           /home/dead10ck/.cache/pypoetry/virtualenvs/mastodon-ansible-SPRg-5UF-py3.11
    Executable:     /home/dead10ck/.cache/pypoetry/virtualenvs/mastodon-ansible-SPRg-5UF-py3.11/bin/python
    Valid:          True
    
    System
    Platform:   linux
    OS:         posix
    Python:     3.11.0
    Path:       /usr
    Executable: /usr/bin/python3.11
    
  • OS version and name: Fedora Workstation 37
  • pyproject.toml:
    [tool.poetry]
    name = "mastodon-ansible"
    version = "1.0.0"
    description = ""
    authors = ["Skyler Hawthorne"]
    
    [tool.poetry.dependencies]
    python = "^3.10"
    ansible = "^6.1.0"
    boto3 = "^1.24.42"
    
    [tool.poetry.dev-dependencies]
    
    [build-system]
    requires = ["poetry-core>=1.0.0"]
    build-backend = "poetry.core.masonry.api"
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

After doing poetry install, when running poetry shell, a new shell launches, but it does not activate the overlay of the virtualenv. e.g.

mastodon-ansible/ansible on  main [!] is 📦 v1.0.0 via 🐍 v3.11.0 on ☁  strln-prod
❯ : poetry shell
Spawning shell within /home/dead10ck/.cache/pypoetry/virtualenvs/mastodon-ansible-SPRg-5UF-py3.11

mastodon-ansible/ansible on  main [!] is 📦 v1.0.0 via 🐍 v3.11.0 on ☁  strln-prod
❯ : ansible
Error: nu::shell::external_command (link)

  × External command failed
   ╭─[entry #1:1:1]
 1 │ ansible
   · ───┬───
   ·    ╰── did you mean 'ansi'?
   ╰────
  help: No such file or directory (os error 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions