Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
1.01k stars 131 forks source link

ModuleNotFoundError: No module named 'urllib3' #443

Open o-agassizii opened 11 months ago

o-agassizii commented 11 months ago

When I run this step from the Readme:

rm -f .api.deps .cli.deps && FETCH_APIS=1 make update-json -j8

I get the following error:

[...]
  File "/Users/user/src-dev/github.com/Byron/google-apis-rs/.pyenv-Darwin/lib/python3.11/site-packages/mako/runtime.py", line 943, in _exec_template
    callable_(context, *args, **kwargs)
  File "src/generator/templates/deps.mako", line 24, in render_body
    import urllib3
ModuleNotFoundError: No module named 'urllib3'
make: *** [.cli.deps] Error 1
make: *** Waiting for unfinished jobs....
make: *** [.api.deps] Error 1

This is in spite of the Readme saying:

Make will download all other prerequisites automatically into hidden directories within this repository, which requires it to make some downloads via wget

o-agassizii commented 11 months ago

As a workaround I did the following:

. ./.pyenv-Darwin/bin/activate
pip install urllib3

And then closed the shell, and opened a new terminal (because I did not want to stay in the venv).

After that it's able to proceed when I run

rm -f .api.deps .cli.deps && FETCH_APIS=1 make update-json -j8
o-agassizii commented 11 months ago

Imo, this should be considered a bug and the makefiles should be updated so that it also installs the urllib3 dep in the venv on its own

Byron commented 11 months ago

Thanks for digging into this, it's much appreciated!

Do you think you can submit a PR with a fix?