Numpy module not found in EC2 instance

0 votes

When I try to execute numpy script on AWS EC2, I am getting the following error.

[ec2-user@ip-XXX-XX-XX-XX ~]$ python samplenumpy.py
Traceback (most recent call last):
  File "samplenumpy.py", line 2, in <module>
    import numpy as np
ImportError: No module named numpy

How can I fix this?

Mar 28, 2019 in AWS by river
1,213 views

1 answer to this question.

0 votes

The most probable reason can be like this:

Your numpy-install is for python 2.6 (so old). I really hope, you are using python 2.7, which would mean there might be still no numpy available for this version! This was the same thing that happened to me. So try updating/ installing the newer verion.

answered Mar 28, 2019 by fuji

Related Questions In AWS

0 votes
1 answer

Getting ORA-01882: timezone region not found with Oracle UCP, on aws ec2 instance?

You can pass command line argument -Duser.timezone=<Database Time ...READ MORE

answered Oct 3, 2018 in AWS by Priyaj
• 58,100 points
4,229 views
0 votes
1 answer

Not able to run script in EC2 AMI instance

To allow run the 'aws s3 sync' ...READ MORE

answered Aug 28, 2019 in AWS by Randy
2,183 views
0 votes
1 answer

How to create an AWS EC2 Instance in the VPC with Boto3 module?

Hi@akhtar, You can use a network interface in ...READ MORE

answered Oct 11, 2020 in AWS by MD
• 95,460 points
2,460 views
0 votes
1 answer

if instance is a part of some AutoScaling Group in AWS or not ?

You can run this command below on ...READ MORE

answered Jun 2, 2018 in AWS by Cloud gunner
• 4,670 points
1,769 views
0 votes
1 answer

Using Shapely on AWS Lambda with Python 3

For some reason, the pip install of ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 58,100 points
2,932 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Connecting AWS EC2 instance using Java

An Amazon EC2 instance is just like ...READ MORE

answered Mar 28, 2019 in AWS by Disha
4,258 views
0 votes
1 answer

How to resize an EC2 instance?

There is no API call available to ...READ MORE

answered Mar 28, 2019 in AWS by Revlover
1,253 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP