Python导入模块不存在? [英] Python importing Module that does not exist?

查看:120
本文介绍了Python导入模块不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在跑步:

import google
> <module 'google' (built-in)>

在python提示符下. google.路径

In python prompt. google.path

['/Library/Python/2.7/site-packages/google']

['/Library/Python/2.7/site-packages/google']

我想删除Google模块.所以我:

I want to delete the google module. So I :

rm -rf /Library/Python/2.7/site-packages/google

没了!

但是当我回到python shell时,我得到的结果与上面相同.

But When I go back into python shell I get the same results as above.

(仅供参考,我相信python模块用于protobuf.)

(FYI, The python module was for protobuf I believe.)

有什么想法吗?

推荐答案

您需要卸载"protobuf"模块.

You need to uninstall the 'protobuf' module.

sudo pip uninstall protobuf

这篇关于Python导入模块不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆