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

ModuleNotFoundError: No module named 'six.moves' with python 3.12 #133

Closed
saiaprameya opened this issue Oct 27, 2023 · 5 comments
Closed

Comments

@saiaprameya
Copy link

File "python3.12/site-packages/IPython/core/ultratb.py", line 104, in
import stack_data
File "python3.12/site-packages/stack_data/init.py", line 1, in
from .core import Source, FrameInfo, markers_from_ranges, Options, LINE_GAP, Line, Variable, RangeInLine,
File "python3.12/site-packages/stack_data/core.py", line 16, in
from asttokens.util import Token
File "python3.12/site-packages/asttokens/init.py", line 22, in
from .asttokens import ASTText, ASTTokens, supports_tokenless
File "python3.12/site-packages/asttokens/asttokens.py", line 25, in
from six.moves import xrange # pylint: disable=redefined-builtin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'six.moves'

pip list | grep six
six 1.15.0
pip list | grep asttokens
asttokens 2.4.1

@saiaprameya
Copy link
Author

one observation is that when i run in python3.12
i see that:
import six
six.moves.xrange starts working
but its not allowing to do from six.moves import xrange
which is a strange thing.

@alexmojaki
Copy link
Contributor

Upgrade six

@saiaprameya
Copy link
Author

Thanks Alex it worked.

@PeterJCLaw
Copy link
Collaborator

I think this suggests a bug in asttokens? If the package isn't specifying the right version/range of its dependencies then that's something we should probably fix.

@alexmojaki
Copy link
Contributor

Yes but really we should review #117 and get rid of six completely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants