Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8753181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:22:48+00:00 2026-06-13T13:22:48+00:00

How can I install numpy,scipy,matplotlib on Heroku? So first locally I’m doing pip install

  • 0

How can I install numpy,scipy,matplotlib on Heroku?

So first locally I’m doing pip install matplotlib -> i get an error saying install numpy..
so i do pip install numpy and get an error saying

  File "/home/sghose/myapp/helloflask/build/numpy/numpy/distutils/command/build_src.py", line 385, in generate_sources

    source = func(extension, build_dir)

  File "numpy/core/setup.py", line 410, in generate_config_h

    moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)

  File "numpy/core/setup.py", line 41, in check_types

    out = check_types(*a, **kw)

  File "numpy/core/setup.py", line 271, in check_types

    "Cannot compile 'Python.h'. Perhaps you need to "\

SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/sghose/myapp/helloflask/build/numpy

…what do I do now? Typically I would just do apt-get install python-numpy … but then I’m thinking pip won’t pick it up and then Heroku will be unhappy when I push… also I see a previous post where they recompiled numpy,scipy, matplotlib and changed vars so that they pointed to heroku packages (http://stackoverflow.com/questions/9819968/running-scipy-on-heroku) ? Is this still necessary? Sounds somewhat painful >_<

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:22:50+00:00Added an answer on June 13, 2026 at 1:22 pm

    How Heroku installs dependencies

    When you push code to Heroku, Heroku will only look at your requirements.txt file and install the packages that are listed in there.

    How you list those dependencies

    Heroku doesn’t care about how you created that file (by hand, or using pip freeze), so nothing prevents you from adding a package to the requirements.txt file, you just have to add a line in there with the name of the requirement.

    How that solves your issue

    Once you add the matplotlib line to your requirements.txt file, you can then push your code to Heroku, and they will figure out what to do with your matplotlib requirement.

    If that doesn’t work, you can always contact Heroku, but if the only requirement is the python headers, I’d be surprised if it wasn’t available on Heroku.


    Regarding local installation, Ben Mezger’s answer is right, you just have to:

    • apt-get install the python headers (these are not a python package, so you don’t install them with pip). Heroku likely has those available already.
    • Install the package using pip, it will then compile properly.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Any ideas how I can install RTidyHTML when I get the following error message?
I just finished a horrible install of scipy, numpy, and matplotlib on OSX Lion.
Is there any module in Orchard CMS that I can install to get a
Can I install apk file without downloading? The apk file is on the server.
I can install an artifact by install:install-file , but how can I download an
I want to make my android application as executable file that can install in
I hear you can install a MySQL plugin, but where can I get that?
I have manually built numpy , scipy , matplotlib etc - without root privilages
When I try to install scipy using pip install scipy it fails with the
NumPy installer can't find python path in the registry. Cannot install Python version 2.6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.