2016-04-04 29 views
2

boto3がインストールされ、最新リリースにアップグレードされました。インストールの簡単なピップを試しました。私はpythonの複数のバージョンがインストールされているので、私もvirtualenv venvにインストールしようとしました。しかし、私は同じエラーが発生します: "boto3という名前のモジュールはありません"。ImportError:モジュールboto3がありません

pip install boto3 

python 
Python 2.7.11 (default, Mar 10 2016, 14:12:44) 
[GCC 4.6.3] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import boto3 
Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
ImportError: No module named boto3 
>>> 

私は/ sudoをせずに試してみました:ラズベリーパイにAWS SDKをインストールしようとして

sudo pip install boto3 

I`m。

pip freeze 

には、「boto3 == 1.3.0」がインストールされています。

sudo pip install boto3 

Requirement already satisfied (use --upgrade to upgrade): boto3 in /usr/local/lib/python2.7/dist-packages 
Requirement already satisfied (use --upgrade to upgrade): botocore>=1.4.1, <1.5.0 in /usr/local/lib/python2.7/dist-packages (from boto3) 
Requirement already satisfied (use --upgrade to upgrade): jmespath>=0.7.1,<1.0.0 in /usr/local/lib/python2.7/dist-packages (from boto3) 
Requirement already satisfied (use --upgrade to upgrade): futures>=2.2.0,<4.0.0 in /usr/local/lib/python2.7/dist-packages (from boto3) 
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=2.1,<3.0.0 in /usr/local/lib/python2.7/dist-packages (from botocore>=1.4.1,<1.5.0->boto3) 
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.10 in /usr/local/lib/python2.7/dist-packages (from botocore>=1.4.1,<1.5.0->boto3) 
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python2.7/dist-packages (from python-dateutil>=2.1,<3.0.0->botocore>=1.4.1,<1.5.0->boto3) 
Cleaning up... 

答えて

3

sudo pip install boto3はあなたのグローバルピップにインストールします。ここで説明:Unable to install boto3

あなたは、あなたのvenvを有効にsudoなしboto3をインストールしてのpythonを起動することができます。

$ source path/to/your/ENV/bin/activate 
$ pip install boto3 
$ python 

それとも、あなたのグローバルなインストールを使用することを好む場合の対処:

$ deactivate 
$ pip install boto3 
$ python 

をチェックvirtualenvユーザーガイド:https://virtualenv.pypa.io/en/latest/userguide.html

また、virtualenvwrapperを使用すると、管理が簡単になります。 01私のMac用のグローバル

1

、これは私が同じ問題に直面しても、仮想環境を使用していない

sudo pip install --ignore-installed six boto3 
0

を働きました。 easy_installが私のために働いています。私は2.7

easy_install boto3 
0

pip install boto3

をboto3インストール接続してみてくださいそして、

source bin/activate

仮想環境を有効にしてくださいされてUbuntuの16.04と私のPythonのバージョンを使用しています
関連する問題