简体   繁体   English

从Boto导入modul2s出现问题

[英]Problem importing modul2s from boto

I have installed boto like so: python setup.py install; 我已经像这样安装了boto:python setup.py install; and then when I launch my python script (that imports moduls from boto) on shell, an error like this shows up: ImportError: No module named boto.s3.connection 然后在外壳上启动python脚本(从boto导入模块)时,出现如下错误:ImportError:没有名为boto.s3.connection的模块

How to settle the matter? 怎么解决呢?

我使用apt-get install python-boto在Ubuntu上修复了相同的问题

This can happen if the Python script does not use your default python executable. 如果Python脚本不使用您的默认python可执行文件,则会发生这种情况。 Check the shebang on the first line of the script (on *nix) or the .py file association (on Windows) and run that against setup.py instead. 检查脚本第一行上的shebang(在* nix上)或.py文件关联(在Windows上),然后针对setup.py运行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM