0

I'm trying to run a flask app on EC2, using virtualenv. I've created a virtualenv using virtualenv -p /usr/bin/python venv and activated it using source venv/bin/activate. Then I cloned my github flask repo, and ran pip install -r requirements.txt. However, I'm getting an error when installing matplotlib.

File "/home/ec2-user/network-visualizer/venv/lib/python2.6/site-
packages/pip/_vendor/cachecontrol/serialize.py", line 81, in dumps
      ).encode("utf8"),
  MemoryError

I've googled around and tried pip --no-cache-dir install matplotlib as suggested here but this time, I'm seeing

    ================================================================
============

                            * The following required packages can no
t be built:

                            * freetype

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /
tmp/pip-build-3dMFaT/matplotlib

I then ran sudo yum install freetype and got

Package freetype-2.3.11-15.14.amzn1.x86_64 already installed and lat
est version
Nothing to do

I'm stuck now... What should I need to install additionally to make this work?

3 Answers 3

1

Try installing the freetype development tools as well. I think that it's freetype-devel or libfreetype.

Sign up to request clarification or add additional context in comments.

Comments

0

Try running this

sudo yum install pkg-config 

Comments

0

Install the following:

sudo apt install libfreetype6 libfreetype6-dev

That should solve the problem

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.