Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
skanel opened this issue Feb 27, 2022 · 6 comments
Labels
kind/bug Something isn't working as expected

Comments

@skanel
Copy link

skanel commented Feb 27, 2022

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 <[email protected]>"]

[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"

@skanel skanel added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 27, 2022
@dimbleby
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

dimbleby commented Mar 9, 2022

it's still a duplicate and this should be closed

@abn
Copy link
Member

abn commented Mar 10, 2022

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

The resolution would be be:

  • remove existing poetry installation and poetry created virtualenvironments maybe
  • remove virtualenv package from python interpreter you are installing poetry with (apt-get remove python3-virtualenv or pip uninstall virtualenv etc this varies depending on your environment)
  • install poetry via one of the options in https://python-poetry.org/docs/master/#installation

Closing this as duplicate of #5201 #5186.

@abn abn closed this as completed Mar 10, 2022
@mkniewallner mkniewallner removed the status/triage This issue needs to be triaged label Jun 11, 2022
@peterbraden
Copy link

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.

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

6 participants