I used pip to uninstall the google
python module. However, import google
still works. What am I missing?? I want to banish this module from my computer

- 630
- 2
- 8
- 23
-
Have you restarted the shell after you did so? Because if not, there might be a cached `.pyc` or similar somewhere. – Torxed Oct 17 '18 at 13:16
-
Restarted my computer. No joy – rvictordelta Oct 17 '18 at 13:17
-
After importing, just type `google` and post the output, as text would be best. – Klaus D. Oct 17 '18 at 13:20
-
@Klaus D. `
` – rvictordelta Oct 17 '18 at 13:21 -
You are not the only one with that problem: https://stackoverflow.com/questions/27051654/python-importing-module-that-does-not-exist – Klaus D. Oct 17 '18 at 13:23
2 Answers
If you want to remove this module then the easy way to remove it from anaconda-navigator. Open your dashboard and search for installed modules, from the list uncheck this module.

- 3
- 3
-
Thanks, I just tried this too .. Google module does not appear in the navigator either – rvictordelta Oct 17 '18 at 13:26
The fact that the repr
of google
is <module 'google' (built-in)>
implies that the module was baked into your interpreter; it can't be uninstalled, because it's been baked into Python itself (deleting it would involve carving out pieces of python.exe
or python*.dll
). Even C extension modules will reference their file if they were built separately (to a .dll
/.pyd
on Windows, to a .so
on UNIX-likes); the fact that it doesn't provide the path to an existing file/folder means it's really built-in.
You see the same behavior in normal (non-Anaconda) Python installs with "critical" modules like sys
which are considered so critical to normal Python functionality (e.g. implementing loading of modules) and/or always used so early in every Python program that it's not worth splitting them out for lazy loading.
It looks like the Anaconda folks baked google
into the build for your distribution, they didn't just ship it "alongside". Point is, you can't uninstall it without replacing your Anaconda install with one that doesn't have it.

- 143,180
- 12
- 188
- 271