python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.06k stars 2.26k forks source link

No module named 'virtualenv.activation.xonsh' when run poetry shell command inside the project #5241

Closed skanel closed 2 years ago

skanel commented 2 years ago

I got this when i ran the command poetry shell , i am on the MacOS and pycharm

poetry shell Creating virtualenv go24-pos24-fastapi-uhxSYnFl-py3.9 in /Users/kanel/Library/Caches/pypoetry/virtualenvs

ModuleNotFoundError

No module named 'virtualenv.activation.xonsh'

at :984 in _find_and_load_unlocked

here is my pyproject.toml

[tool.poetry]
name = "go24-pos24-fastapi"
version = "0.1.0"
description = ""
authors = ["kanel soeng <kan3l@gmail.com>"]

[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.63.0"
sqlalchemy = "^1.3.18"
uvicorn = {extras = ["standard"], version = "^0.17.1"}
python-dotenv = "^0.14.0"
python-multipart = "^0.0.5"
python-jose = {extras = ["cryptography"], version = "^3.2.0"}
passlib = "^1.7.2"
pydantic = {extras = ["email"], version = "^1.6.1"}
alembic = "^1.4.2"
inflect = "^4.1.0"
bcrypt = "^3.1.7"
sqlalchemy_utils = "^0.36.8"
psycopg2-binary = "^2.8.5"
tenacity = "^6.2.0"
aiofiles = "^0.8.0"

[tool.poetry.dev-dependencies]
pytest = "^5.2"
mypy = "^0.782"
sqlalchemy-stubs = "^0.3"
flake8 = "^3.8.3"
autoflake = "^1.3.1"
isort = "^5.3.2"
black = "^19.10b0"
pytest-cov = "^2.10.1"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
dimbleby commented 2 years ago

You deleted the template, which asked you to confirm that you had looked for duplicates. Please look for duplicates when opening bug reports.

5201, #5186.

Tetfretguru commented 2 years ago

Hi, I just installed using install-poetry,py script and still having the same issue.

  ModuleNotFoundError

  No module named 'virtualenv.activation.xonsh'

  at <frozen importlib._bootstrap>:973 in _find_and_load_unlocked

Any idea?

dimbleby commented 2 years ago

it's still a duplicate and this should be closed

abn commented 2 years ago

@skanel @Tetfretguru this is a known issue with debian environments with xonsh and a duplicate as pointed out above.

The resolution would be be:

Closing this as duplicate of #5201 #5186.

peterbraden commented 2 years ago

This is still an issue when running curl -sSL https://install.python-poetry.org | python3 - as mentioned in https://python-poetry.org/docs/master/#installation as of today.

Removing virtualenv does resolve the issue, commenting for those who still run into it.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.