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

Exception: No module named 'virtualenv.activation.nushell' #4515

Closed
3 tasks done
shahinism opened this issue Sep 17, 2021 · 8 comments
Closed
3 tasks done

Exception: No module named 'virtualenv.activation.nushell' #4515

shahinism opened this issue Sep 17, 2021 · 8 comments
Labels
status/external-issue Issue is caused by external project (platform, dep, etc)

Comments

@shahinism
Copy link

shahinism commented Sep 17, 2021

  • 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).

Issue

Hi,

Starting yesterday afternoon, on our Gitlab CI runners, poetry install and poetry run commands are failing with the following error:

  ModuleNotFoundError
  No module named 'virtualenv.activation.nushell'
  at <frozen importlib._bootstrap>:984 in _find_and_load_unlocked

I suspect this is related to yesterday's release of the pypa/virtualenv#2170 release which added nutshell support.

However, the reason I report it here, is that I can't reproduce it with normal virtualenv creation commands when this version of virtualenv is installed. I tried to resolve this issue by setting SHELL environment variable to bash (as expected to inform poetry about the desired shell), and failed. However, running poetry commands like:

bash -c poetry install
bash -c poetry run ...

Works with no problem. You can find a more detailed log output on this gist.

@shahinism shahinism added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 17, 2021
@theelderbeever
Copy link

Having this same issue on MacOS when attempting to poetry add 'dvc[s3]' into a python 3.8.10 virtualenv created with pyenv.

@linzwatt
Copy link

I was getting the same issue. Rolling back virtualenv to the previous version fixed this for me...
pip install virtualenv==20.7.2

@garciparedes
Copy link

I had the same problem, but it was fixed simply updating poetry to the latest version with:

poetry self update

@systematicguy
Copy link

I ran into the same issue now using a fresh Poetry version 1.1.13 (recommended installation) with a fresh Python 3.9.6 coming from pyenv-win.
Trying this with a Python 3.8.10 (also coming from pyenv) does not reproduce the problem.

@AliyevH
Copy link

AliyevH commented Sep 22, 2022

I could fix this issue with pip uninstall virtualenv.

@neersighted neersighted added status/external-issue Issue is caused by external project (platform, dep, etc) and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 22, 2022
@neersighted
Copy link
Member

Should be resolved -- this is an issue with versions of the virtualenv module. If anyone can identify the bad versions we can exclude them from our constraints -- otherwise simply updating to a modern version should fix this.

@MythicManiac
Copy link

MythicManiac commented May 5, 2023

Started facing a similar issue with poetry versions 1.4.0 and above, older versions work.

I was getting the same issue. Rolling back virtualenv to the previous version fixed this for me...
pip install virtualenv==20.7.2

This seems to have fixed it, but I'm still unsure what the root cause is. I tried to look through the diffs between 1.3.2 and 1.4.0 but nothing immediately seems suspicious. The virtualenv version pin did change, so perhaps 1.3.2 resolved to a virtualenv version that didn't have the issue, whereas 1.4.0 resolves to a version that does (by default anyway).

Copy link

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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/external-issue Issue is caused by external project (platform, dep, etc)
Projects
None yet
Development

No branches or pull requests

8 participants