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 'urllib3.packages.six.moves' #1422

Open
StephenZhiyiLin opened this issue Nov 30, 2023 · 4 comments
Open

Comments

@StephenZhiyiLin
Copy link

I am studying UCB's CS61A course. I have downloaded the ok program from the course website. However, when I was trying to run the ok program on my terminal, there was something wrong and the terminal reported ModuleNotFoundError: No module named 'urllib3.packages.six.moves'. How can I solve this problem?

The error tracebacks are:

$ python ok -q python-basics -u --local
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\Root_Server\Software_Engineering\Courses\CS61A\Lab\lab00\ok\__main__.py", line 14, in <module>
  File "D:\Root_Server\Software_Engineering\Courses\CS61A\Lab\lab00\ok\client\cli\ok.py", line 48, in <module>
  File "D:\Root_Server\Software_Engineering\Courses\CS61A\Lab\lab00\ok\client\api\assignment.py", line 5, in <module>
  File "D:\Root_Server\Software_Engineering\Courses\CS61A\Lab\lab00\ok\requests\__init__.py", line 43, in <module>
  File "D:\Root_Server\Software_Engineering\Courses\CS61A\Lab\lab00\ok\urllib3\__init__.py", line 7, in <module>
  File "D:\Root_Server\Software_Engineering\Courses\CS61A\Lab\lab00\ok\urllib3\connectionpool.py", line 11, in <module>
  File "D:\Root_Server\Software_Engineering\Courses\CS61A\Lab\lab00\ok\urllib3\exceptions.py", line 2, in <module>
ModuleNotFoundError: No module named 'urllib3.packages.six.moves'

I have reinstalled the urllib3 package, but I still can not solve the problem. I hope that I can run the ok program on my terminal normally in order to test my labs, assignments and homeworks. I would be appreciated if I can get your help!

PS:

  1. My OS is Windows and my terminal is Git-bash.
  2. I have tried to run the ok program on the terminal of Linux, but the terminal also reported ModuleNotFoundError: No module named 'urllib3.packages.six.moves'.
@beeburt
Copy link

beeburt commented Jan 2, 2024

Same issue, is there a fix for this?

@StephenZhiyiLin
Copy link
Author

StephenZhiyiLin commented Jan 3, 2024 via email

@beeburt
Copy link

beeburt commented Jan 13, 2024

I used python version 3.11 (I first tried version 3.10 and it worked) in a virtual environment.

ok doesn't like pyhon3.12 for some reason.

I'm on Fedora, so first I installed Python3.11 with:

sudo dnf install python 3.11

then in my directory for the course (venv would work too):

virtualenv --python=$(which python3.11) cs61a-venv

then activate it:

source cs61a-venv/bin/activate

@NikoHYK
Copy link

NikoHYK commented Jan 31, 2024

我也遇到这样的问题,刚刚成功解决。
我是学的2023 Fall的课程,使用python3.12和3.11都显示报错,后来去课程页面看了「Lab 00: Getting Started」,里面写着

Python 3.7 or later (ideally Python 3.9)

我感觉可能是版本太高的问题,于是我卸载了3.12和3.11,安装了3.9,就可以运行了。

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