Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named pytz #16

Open
ghost opened this issue Jun 26, 2019 · 4 comments
Open

ImportError: No module named pytz #16

ghost opened this issue Jun 26, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 26, 2019

Executing this command gives:

$ python apache-fake-log-gen.py -n 100 -o GZ -s 10

Traceback (most recent call last):
File "apache-fake-log-gen.py", line 4, in
import pytz
ImportError: No module named pytz

I'm on Amazon Linux ami-0f2176987ee50226e

@ghost
Copy link
Author

ghost commented Jun 26, 2019

This command pip install -r requirements.txt needs to be sudo pip install -r requirements.txt

@EndrisKerga
Copy link

sudo pip install -r requirements.txt works. After that, you can generate your logs.
python apache-fake-log-gen.py -n 20

@mukscool
Copy link

mukscool commented Mar 9, 2020

Hello All, I am getting below error while executing on Amazon Linux AMI
Traceback (most recent call last):
File "apache-fake-log-gen.py", line 4, in
import pytz
ImportError: No module named pytz

Also I am not able to install pip. Can someone help ?

@bigcumulus
Copy link

bigcumulus commented Mar 31, 2020

@mukscool sudo yum install pytz for installing python packages on Amazon Linux AMI

Additionally, running the command: sudo yum install python-pip will allow you to utilize pip commands in the instance (change [python > python2, python3] or [pip >pip3] in that command if you run into versioning issues . You will need to use sudo before your pip and yum commands for root access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants