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?

Community
  • 1
  • 1
alpaca
  • 1,211
  • 13
  • 23

3 Answers3

1

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

aquil.abdullah
  • 3,059
  • 3
  • 21
  • 40
0

Try running this

sudo yum install pkg-config 
Arya
  • 1,382
  • 2
  • 15
  • 36
0

Install the following:

sudo apt install libfreetype6 libfreetype6-dev

That should solve the problem

Bussller
  • 1,961
  • 6
  • 36
  • 50