question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PIP Installation issue on some linux / docker environment

See original GitHub issue

I’ve been using fbprophet in my local dev environment (Mac) for a while for forecasting purpose and It’s AWESOME.

I’m planning to run my forecasting engine on EC2. But I have issue with installing the fbprophet. I’ve also managed to reproduce the installation issue on my docker container. Below is the command that I used to test the installation of the fbprophet library in the runtime docker container. docker run --rm -i -t python:3.6.0 bash -c "pip install fbprophet==0.2"

I’m using python3.6 docker image from docker-hub. Just wondering if there is any issue with the specific version of gcc. I’ve also checked the version of gcc installed in python3.6 docker image. It has gcc (Debian 4.9.2-10) 4.9.2

Below is the error.

Installing collected packages: pyparsing, six, cycler, numpy, python-dateutil, pytz, matplotlib, pandas, Cython, pystan, fbprophet
  Running setup.py install for fbprophet ... error
    Complete output from command /usr/local/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6027ivd3/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-khm0g75a-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/fbprophet
    creating build/lib/fbprophet/stan_models
    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_1fdd477dd8bcc50395c4e25c8741f1c1 NOW.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/local/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6027ivd3/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-khm0g75a-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6027ivd3/fbprophet/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Oct 17, 2017

I have installed fbprophet on numerous memory sizes. It requires 4GB to compile - and I got the tokenize error during Pystan. It wouldn’t even install on a C4 Large (3.75GB), but it did work at 4GB. To install on EC2, I used a T2.Medium, and then downgraded to actually run it. This does apply in your case, because per documentation [1], there are no resource constraints initially placed on the docker VMs, which could very well mean that is never getting the 4 GB required to compile Pystan. I have confirmed on EC2 using CENT OS images that it will not work on a C4 Large (3.75GB), but will work on a 4GB, using the exact same instance - merely changing instance type. By default, Docker for MAC is set to a maximum of 2GB per VM. [2] You may have hit this situation on yours.

It will run fine with 2GB, but the installation will fail to compile with less than 4GB, and will fail even at 3.75GB on C4.Large on AWS.

[1] https://docs.docker.com/engine/admin/resource_constraints/#limit-a-containers-access-to-memory [2] https://stackoverflow.com/questions/44533319/how-to-assign-more-memory-to-docker-container

On Thu, Oct 12, 2017 at 11:44 PM, Ray Chew notifications@github.com wrote:

Hi Ben, Thanks for the response. The issue is in the installation of fbprophet library in the docker container. If you are using docker in your local machine, you can easily reproduce the issue by running the below command.

docker run --rm -i -t python:3.6.0 bash -c “pip install fbprophet==0.2”

Please let me know if you have additional information.

Regards, Ray

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/facebook/prophet/issues/326#issuecomment-336342375, or mute the thread https://github.com/notifications/unsubscribe-auth/AZTbFqh00iwu2ESkalvaSA03TLrjWTMMks5srtyJgaJpZM4PzaW6 .

0reactions
blethamcommented, Apr 18, 2019

Actually it looks like the integration tests on Travis are now failing for the same reason, and was also fixed by setting pystan<=2.18.1. I’m opening an issue for it in #930

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install pip packages inside a docker container with Ubuntu
However pip works fine to install things outside of the docker container, and worked fine even with that exact package ( blinker==1.3 )...
Read more >
Issue with installing pip packages inside a docker container ...
I have setup docker on my fresh ubuntu 16.04.02 setup. successfully run the “docker run hello-world” and “ubuntu bash”.
Read more >
Installing - angr Documentation
All of the Python dependencies should be handled by pip and/or the setup.py scripts. You will, however, need to build some C to...
Read more >
Installing Python Packages In Your Docker Container
However, because pip can only install Python packages, you may find yourself also having to use your package manager (i.e., apt-get install -y...
Read more >
Label Studio Documentation — Install and Upgrade
Install Label Studio on premises or in the cloud. Choose the installation method that works best for your environment: Install with pip; Install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found