question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError virtualenv.activation.nushell since 20.8.0

See original GitHub issue

Issue

expected: poetry install successfully creates virtual env

observed:

  • fails with today’s new release 20.8.0
  • works if I run pip3 install 'virtualenv==20.7.2' --force-reinstall first

Environment

Provide at least:

  • OS: alpine linux 3.12

Output of the virtual environment creation

(running in docker using alpine 3.12)

RUN poetry install --no-root --no-dev
Creating virtualenv in ...

  ModuleNotFoundError

  No module named 'virtualenv.activation.nushell'

  at <frozen importlib._bootstrap>:984 in _find_and_load_unlocked

I may be mistaken (not really a python expert), but I believe this commit/line is the culprit that broke things:

https://github.com/pypa/virtualenv/commit/e0410cafc8feedf72562174dee983fc709a5a36e#diff-fa602a8a75dc9dcc92261bac5f533c2a85e34fcceaff63b3a3a81d9acde2fc52R112

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
StephanHCBcommented, Sep 17, 2021

RUN pip3 install tox --ignore-installed

This line seems dangerous, as it will drop newer versions of libraries (including virtualenv) over the top of existing versions, which potentially leaves a “mix” of old and new code.

Why do you do --ignore-installed rather than a simple install (or if absolutely necessary, a --force-reinstall)?

I actually don’t remember why I added that. I have now removed it and it didn’t change the behavior. Thank you for the tip.

I think I have found the problem, though - @gaborbernat was right - my container was still using poetry 1.1.7 instead of 1.1.8. With poetry 1.1.8, it works without the virtualenv downgrade.

Sorry about the confusion and thank you all for your help. Closing this.

SOLUTION TL/DR: ensure you’re on the latest poetry version!

0reactions
gaborbernatcommented, Dec 26, 2021

This seems like a failed installation on debian 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception: `No module named 'virtualenv.activation.nushell ...
If an exception occurs when executing a command, I executed it again in debug mode ( -vvv option). OS version and name: python:3.9...
Read more >
No module named nushell? - venv - Raspberry Pi Forums
Trying to create a venv on a Pi Zero 2 pip install virtualenv==20.4.7 pi@raspberrypi:~ $ virtualenv flaskenv ... How do I install nushell?...
Read more >
ModuleNotFoundError virtualenv.activation.nushell since 20.8.0
Issue. expected: poetry install successfully creates virtual env. observed: fails with today's new release 20.8.0; works if I run pip3 install ...
Read more >
Release History — virtualenv 20.17.2.dev2+g6845f6f ...
Update operator used in Nushell activation script to be compatible with ... Drop python 3.4 support as it has been over 2 years...
Read more >
virtualenv - bytemeta
ModuleNotFoundError virtualenv.activation.nushell since 20.8.0 ... Make software development more efficient, Also welcome to join our telegram.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found