2016-04-04 8 views
2

Installierte das boto3 und aktualisierte es auf die neueste Version. Ich habe den einfachen Installationspip für die Installation ausprobiert. Ich habe mehrere Versionen von Python installiert, so habe ich sogar versucht, in virtualenv venv zu installieren. Aber ich bekomme den gleichen Fehler: "Kein Modul namens boto3".ImportError: Kein Modul namens 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 
>>> 

Ich habe versucht, mit/ohne sudo:

sudo pip install boto3 

I`m versucht AWS SDK auf Raspberry Pi zu installieren.

pip freeze 

zeigt "boto3 == 1.3.0" installiert.

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... 

Antwort

3

sudo pip installieren boto3 installiert es in Ihrem globalen pip. Erklärt sich hier: Unable to install boto3

Sie Ihre Venv aktivieren, installieren boto3 ohne sudo und starten Python:

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

Oder wenn Sie es vorziehen, Ihre globale Installation verwenden tun:

$ deactivate 
$ pip install boto3 
$ python 

Schauen Sie sich die virtualenv Benutzerhandbuch: https://virtualenv.pypa.io/en/latest/userguide.html

Auch virtualenvwrapper macht es wirklich einfach zu verwalten: https://virtualenvwrapper.readthedocs.org/en/latest/install.html

1

Global für meinen Mac, arbeiteten diese

sudo pip install --ignore-installed six boto3 
0

ich das gleiche Problem konfrontiert und auch nicht virtuelle Umgebung. easy_install funktioniert für mich. Ich bin mit Ubuntu 16.04 und meine Python-Version ist 2,7

easy_install boto3 
0

Versuchen Sie, Ihre virtuelle Umgebung

source bin/activate

Dann versuchen zu aktivieren Verbindungs ​​boto3 Installation

pip install boto3