Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install boto3

I have trouble installing boto3 inside a virtual environment.

I have done what the document says. First I activated virtual environment. then I did a:

Sudo pip install boto3 

Now I enter python

>> import boto3 ImportError: No module named boto3 

But if I import boto, it works

>> import boto >> boto.Version '2.38.0' 

Why does it install boto 2.38 when I installed boto3. I tried closing the terminal and re-opened it. Should I restart the Ubuntu machine?

like image 689
Prabhakar Shanmugam Avatar asked Oct 28 '15 10:10

Prabhakar Shanmugam


People also ask

Why can I not import boto3?

The Python error "ModuleNotFoundError: No module named 'boto3'" occurs for multiple reasons: Not having the boto3 package installed by running pip install boto3 . Installing the package in a different Python version than the one you're using. Installing the package globally and not in your virtual environment.

How do I install boto3 on Windows 10?

How to Install boto3 on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type “ pip install boto3 ” (without quotes) in the command line and hit Enter again. This installs boto3 for your default Python installation.


1 Answers

There is another possible scenario that might get some people as well (if you have python and python3 on your system):

pip3 install boto3 

Note the use of pip3 indicates the use of Python 3's pip installation vs just pip which indicates the use of Python 2's.

like image 143
CasualT Avatar answered Oct 01 '22 03:10

CasualT